I have a flash application deployed to a hero. I need to schedule a background task to run at a specific time. I tried using the apscheduler module. Although it allows you to define periodic tasks by easily adding them from the application at runtime, this is what I am looking for.
I tried using the same jobs in apscheduler
import time from apscheduler.scheduler import Scheduler from apscheduler.jobstores.shelve_store import ShelveJobStore sched = Scheduler() sched.add_jobstore(ShelveJobStore('jobstore.db'), 'shelve') sched.start()
And from the terminal I tried this,
Python 2.7.5 (default, May 12 2013, 12:00:47) [GCC 4.8.0 20130502 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from apscheduler.scheduler import Scheduler >>> sc = Scheduler() >>> sc.add_jobstore('jobstore.db', 'shelve') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/dhananjay/git/blast/venv/lib/python2.7/site-packages/apscheduler/scheduler.py", line 168, in add_jobstore jobstore.load_jobs() AttributeError: 'str' object has no attribute 'load_jobs'
I came across this question while looking for a celery based approach. He talks about the same problem from the point of view of django, but I cannot get it to work with my application (I completely ignore django)
source share