python - APScheduler process not working with heroku/django set up -


i'm having problems getting apscheduler process on heroku working django environment.

what did create management command apscheduler jobs had access django environment.

appname/management/commands/scheduler.py

class command(basecommand):   """   management command apscheduler   """    def handle(self, *args, **kwargs):     sched = scheduler()      @sched.cron_schedule(day_of_week='mon-sun', hour=0, minute=0)     def a_weekly_job():       run_some_code()      sched.start()     print "scheduler started"      while true:       pass 

i set procfile following (for scheduler process)

scheduler: python manage.py scheduler 

however, when deploy application scheduler process, following warning message , job not run:

warning:apscheduler.scheduler:run time of job "a_weekly_job" (trigger: cron[day_of_week='mon-sun', hour='23', minute='25'], next run at: 2013-09-24 23:25:00)" missed 0:00:07.261174 

how job run?

add clock.py file:

sched = scheduler()  @sched.cron_schedule(day_of_week='mon-sun', hour=0, minute=0) def a_weekly_job():   run_some_code()  sched.start() print "scheduler started"  while __name__ == '__main__':   pass 

procfile:

web: ... clock: python clock.py --loglevel=info 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -