![]() |
![]()
| ![]() |
![]()
NAMEGantry::Utils::CRON - a way to call a controller's method from a CRON script SYNOPSISuse strict; use warnings; use Gantry::Utils::CRON; my $cron = Gantry::Utils::CRON->new( { controller => 'Apps::RR::InvoiceMunger::Batch', conf_instance => 'apps_rr_invoicemunger_dev_prod', conf_file => '/etc/gantry.conf', # optional template_engine => 'TT', # optional namespace => 'Apps::RR::InvoiceMunger', # optional } ); # alternative setters $cron->set_controller( 'Apps::RR::InvoiceMunger::Batch' ); $cron->set_conf_instance( 'invoice_munger_prod' ); $cron->set_conf_file( '/etc/gantry.conf' ); $cron->set_template_engine( 'TT' ); $cron->set_namespace( 'mynamespace' ); $cron->run( { method => 'do_process_files', # do_* required args => [ '1', '2' ], # optional params => { confirm => 1, test => 3 } # optional type => 'post' # or 'get' -- optional } ); print STDERR $cron->status(); print STDERR $cron->content(); DESCRIPTIONThis module is a utility to run a Gantry do_ method from a CRON script METHODS
SEE ALSOGantry(3) LIMITATIONSThis module depends on Gantry(3), HTML::TreeBuilder, HTML::FormatText AUTHORTim Keefer <tim@timkeefer.com> COPYRIGHT and LICENSECopyright (c) 2007, Tim Keefer. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
|