Added new scheduler app to abstract job scheduling
This commit is contained in:
12
apps/scheduler/api.py
Normal file
12
apps/scheduler/api.py
Normal 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)
|
||||
Reference in New Issue
Block a user