[Catalyst] Running Catalyst App from Command Line (or via Cron)

Nick Perez nick at nickandperla.net
Fri Jan 8 16:16:45 GMT 2010


On Fri, 08 Jan 2010 16:58:06 +0100
Christoph Friedrich <christoph at christophfriedrich.de> wrote:

> Hello there,
> 
> I need to build a script for my catalyst application that reads some 
> data and put it into the database. This script needs to run as a
> daily cron job.
> My first idea was to create a controller which handles this for me
> and use some of the other engines for catalyst (like 
> Catalyst::Engine::Embeddable or Catalyst::Engine::JobQueue::POE) but
> I'm not sure if this is a good way.
> Does someone of you have an idea how to make such a script? Maybe
> some Best Practices?
> 
> Greets
> Christoph


If the script is running independent of catalyst (cron job) why does it
need to involve your application. Assuming you are using DBIx::Class,
you can use your Schema and associated Result[Set] classes or even your
true domain objects (those are separate from your app right?) to
accomplish this without shoe horning in catalyst.

-- 

Nicholas Perez
XMPP/Email: nick at nickandperla.net
http://search.cpan.org/~nperez/
http://github.com/nperez



More information about the Catalyst mailing list