On 04/11/2011 06:30 PM, Charlie Garrison wrote: > Good evening, > > On 11/04/11 at 10:34 AM +0930, Jon Schutz <jon+catal...@youramigo.com> > wrote: > >> Perhaps fire up your app from the cron job using >> Catalyst::Engine::Embeddable? > > Thanks, didn't know about that one; I'll have a look. > > Hmm, the documentation is a bit sparse; I can't see how to get $c (or > $app). I can't see anything in the test files either which show how to > get the app object. Do you have an example you could share? > > Or should I just start the embeddable instance and then do a > handle_request to process the email sending? >
That was my thought. Usage is essentially... use strict; use warnings; use HTTP::Request; BEGIN { $ENV{CATALYST_ENGINE} = 'Embeddable'; } require MyApp; my $response; MyApp->handle_request(HTTP::Request->new('GET', 'http://localhost/send/email'), \$response); -- Jon Schutz http://notes.jschutz.net/ _______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/