On May7, 4:48pm, mika <[email protected]> wrote:
> Hello!
>
> I'm new to web2py. I have a problem with cron - it seems that it
> doesn't work. Could you tell me what line exactly should be in file
> crontab? application is called "my_app", name of controller is "abc"
> and the name of function is "get". I would like to run function every
> minute.
>
> the line
> * * * * * *my_app/abc/get
>
> is in file my_app/cron/crontab. What's wrong?
>
> regards,
> mika
AFAIK, there is still no "official" web2py cron document but you can
find relevant info in this list. In short, crontab invodes a script
file, not an action in controller. In your case, I guess you need
this:
In crontab:
* * * * * *my_app/cron/trigger.py
In cron/trigger.py you need something like:
import urllib
urllib.urlopen('http://127.0.0.1:8000/my_app/abc/get').read()
BTW, which platform are you using, Windows or Linux?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---