Pavel Skvazh wrote:
> There seam to be different ways to get cron jobs with Pylons.
> In my case model has to be accessible in it.
> Found three articles on the wiki describing different approaches,
> which is rather confusing
>
> http://wiki.pylonshq.com/display/pylonscookbook/Cron+jobs+and+command-line+utilities
This article describes "paster request" as a future possibility, but
it's been implemented for a while. That means you can do:
paster request config.ini /cron
and that will run the controller associated with /cron. You can check
environ.get('paste.command_request') to make sure the request originated
from paster request, if you don't want the command to be publicly
available via HTTP.
This runs all middleware, and so it also sets up all the configuration
just like a normal request.
--
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---