Added new scheduler app to abstract job scheduling

This commit is contained in:
Roberto Rosario
2011-07-23 16:05:31 -04:00
parent ec203b5702
commit 8462341533
10 changed files with 61 additions and 7 deletions

12
apps/scheduler/api.py Normal file
View File

@@ -0,0 +1,12 @@
from scheduler import scheduler
registered_jobs = {}
def register_interval_job(func, weeks=0, days=0, hours=0, minutes=0,
seconds=0, start_date=None, args=None,
kwargs=None, job_name=None, **options):
scheduler.add_interval_job(func=func, weeks=weeks, days=days,
hours=hours, minutes=minutes, seconds=seconds,
start_date=start_date, args=args, kwargs=kwargs)#, **options)