Catalyst::Engine::JobQueue::POE - Cron-like job runner engine
This document describes Catalyst::Engine::JobQueue::POE version 0.0.4
A script using the Catalyst::Engine::JobQueue::POE module might look like:
#!/usr/bin/perl use strict; use lib '/path/to/MyApp/lib'; BEGIN { $ENV{CATALYST_ENGINE} = 'JobQueue::POE'; } use MyApp; MyApp->run;
By specifying the appropiate environment variable, Catalyst will start the JobQueue runner with the POE engine.
Catalyst
This is the Catalyst Engine specialized for running the JobQueue with POE.
Returns the job object with the given ID.
This class overloads some methods from Catalyst::Engine.
Catalyst::Engine
These will cause the JobQueue runner to stop.
Cannot find schedule file "%s"
The configured schedule file doesn't exist. Check that you have supplied the correct filename, or that a file named crontab exists if no schedule_file option was set.
schedule_file
Cannot open crontab "%s" for reading, "%s"
The crontab file could not be read. The message at the end is the system error. Check permissions.
These will warn you of some recoverable error.
Missing renderer %s [skipping]
A renderer configured to deliver the job response could not be found. Check the configuration and docs for supported renderers.
Catalyst::Engine::JobQueue::POE can be configured with the standard Catalyst configuration mechanism. It also uses environment variables for debugging and its own format for job configuration.
These should appear under the Catalyst::Engine::JobQueue::POE key.
Catalyst::Engine::JobQueue::POE
The path to the file which describes the jobs to be run. See "Job Configuration" for more details. Relative to the application root.
Describes how the JobQueue shoudl handle responses
A list of renderers to send the response to. Valid renderers are: log and email.
log
email
The log renderer sends the response body to the Catalyst logger.
The log level at which the response is logged. See Catalyst::Log for more details. The default value is info.
info
The email renderer sends the response via email to a given address. The content type, charset and encoding are taken from the appropiate response header (Content-Type and Content-Encoding). The subject is "Response for Job <ID>".
Content-Type
Content-Encoding
The address from which the email will be sent. The default value is <catalyst@localhost>.
<catalyst@localhost>
The address to which the email will be sent. The default value is <root@localhost>.
<root@localhost>
The name of the SMTP server. The default value is localhost.
localhost
How the response body should be added to the email. Valid values are inline and attachment. The default value attachemnt.
inline
attachment
attachemnt
If you set CATALYST_POE_DEBUG environment variable to a true value (like 1 or 'yes'), debug messages will be printed to STDOUT.
CATALYST_POE_DEBUG
A job configuration file describes jobs and when to run them. It's syntax is modeled after the crontab file syntax.
Each line describes a job. Comments start with '#' and run to the end of the line.
Fields are separated by space. The first five fields describe how often the job will be run, identical to the crontab syntax (minute, hour, day of month, month, day of week). The 6th field specifies a user which the job will be run as (currently unused). The 7th field specifies the path used for the job request and the rest can be used to provide additional parameters to the request.
POE::Component::Cron
Email::MIME::Creator
Email::Send
None reported.
No bugs have been reported.
Please report any bugs or feature requests to bug-catalyst-engine-jobqueue-poe@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-catalyst-engine-jobqueue-poe@rt.cpan.org
Gruen Christian-Rolf <kiki@abc.ro>
<kiki@abc.ro>
Copyright (c) 2006, Gruen Christian-Rolf <kiki@abc.ro>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Catalyst, Catalyst::JobQueue::Job
To install Catalyst::Engine::JobQueue::POE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Engine::JobQueue::POE
CPAN shell
perl -MCPAN -e shell install Catalyst::Engine::JobQueue::POE
For more information on module installation, please visit the detailed CPAN module installation guide.