FAQ
Hi,
I'm trying to use the plugin to run a cron job by adding this to the myapp.pm :
__PACKAGE__->schedule(
at => '0 * * * *',
event => '/email/checkemail',
auto_run => 1,
);

This suppose to set the process checkemail run every hour, but it does nothing at all. I am not sure whether I have put those line in the wrong place, or something else I have to do. Do I need to have a Schedule.yml file (this is only an option according to the doc)? Someone has done this, please give me some instruction. And if I want to run the process more often, like every 15 min, how could I modify the value, if possible.
Thank you


---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070823/1857989e/attachment.htm

Search Discussions

  • Jürgen Peters at Aug 23, 2007 at 2:01 pm

    Am Do, 23.08.2007, 14:45, schrieb Will Smith:
    Hi,
    I'm trying to use the plugin to run a cron job by adding this to the
    myapp.pm :
    __PACKAGE__->schedule(
    at => '0 * * * *',
    event => '/email/checkemail',
    auto_run => 1,
    );

    This suppose to set the process checkemail run every hour, but it does
    nothing at all. I am not sure whether I have put those line in the wrong
    place, or something else I have to do. Do I need to have a Schedule.yml
    file (this is only an option according to the doc)? Someone has done
    this, please give me some instruction. And if I want to run the process
    more often, like every 15 min, how could I modify the value, if possible.
    Thank you
    This is from the C::P::Scheduler perldoc:

    "Events will run during the first request which meets or exceeds the
    specified time."
    "The event to run at the specified time can be either a Catalyst private
    action path or a coderef."

    Have you performed a request after the hour has passed? Is
    '/email/checkemail' a private action? Have you RTFM?


    regards,
    J?rgen
  • Will Smith at Aug 24, 2007 at 4:02 pm
    Thank you for your response.
    Yes, /email/checkemail is a private action, and I have called a Local action /email/runcheckemail which forward to /email/checkemail after 1 hour. It runs one time, and create a Schedule.task file, and then nothing happens after that.
    I don't know what I need to add in order to get it running like what is said in the doc.
    Thank you

    taulmarill@xgn.de wrote: Am Do, 23.08.2007, 14:45, schrieb Will Smith:
    Hi,
    I'm trying to use the plugin to run a cron job by adding this to the
    myapp.pm :
    __PACKAGE__->schedule(
    at => '0 * * * *',
    event => '/email/checkemail',
    auto_run => 1,
    );

    This suppose to set the process checkemail run every hour, but it does
    nothing at all. I am not sure whether I have put those line in the wrong
    place, or something else I have to do. Do I need to have a Schedule.yml
    file (this is only an option according to the doc)? Someone has done
    this, please give me some instruction. And if I want to run the process
    more often, like every 15 min, how could I modify the value, if possible.
    Thank you
    This is from the C::P::Scheduler perldoc:

    "Events will run during the first request which meets or exceeds the
    specified time."
    "The event to run at the specified time can be either a Catalyst private
    action path or a coderef."

    Have you performed a request after the hour has passed? Is
    '/email/checkemail' a private action? Have you RTFM?


    regards,
    J?rgen


    _______________________________________________
    List: Catalyst@lists.rawmode.org
    Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
    Dev site: http://dev.catalyst.perl.org/



    ---------------------------------
    Pinpoint customers who are looking for what you sell.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070824/c2d694c2/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedAug 23, '07 at 1:45p
activeAug 24, '07 at 4:02p
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Will Smith: 2 posts Jürgen Peters: 1 post

People

Translate

site design / logo © 2022 Grokbase