On Fri, Jan 8, 2010 at 7:58 AM, Christoph Friedrich
<[email protected]> 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
>


I would create a standalone perl class that does everything you need,
then in your Catalyst app just implement a thin adapter using
something like Catalyst::Model::Adapter (or
Catalyst::Component::InstancePerContext).

I wouldn't bother with Catalyst in the crontab, instead just
instantiate this model and have it do what needs done.

-J

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to