Dear Community,

I wrote an app using webpy (webpy.org). Part of this web app is
recurring background tasks for statistical functions. I used
``APScheduler`` python library to perform cron style schedules.
Because ``app.run()`` let webpy run in standalone mode during
development. This setup worked out fine.

However, when it's deployed, I discovered that APScheduler no longer
functions. Deployment procedure pretty much follows
http://fartersoft.com/blog/2012/02/10/deployment-of-web-py-applications-using-uwsgi-and-nginx-on-ubuntu/
. My entry point program still prints successful scheduling logs. But
it appears that uwsgi will suspend the running webpy app (making the
thread suspended) when no requests are received. If I refresh a page,
APScheduler will wakeup, printing a few
``WARNING:apscheduler.scheduler:Run time of job "worker (trigger:
cron[...], next run at: ..)" was missed by 0:04:36.389705`` messages.
They are not running according to the schedule.

My question is, how do I schedule cron style tasks when deploying a
uwsgi webpy app. I saw uwsgi itself has cron support. But I wonder how
I can mix it with my app, like APScheduler (or replace it)? The tasks
depends on a few modules and dynamic properties of the app, so they
can't be easily converted into standalone .py programs.

Thanks in advance.

Best regards,
He Shiming

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to