|
@@ -1060,11 +1060,12 @@ class testView(View):
|
|
|
@staticmethod
|
|
|
def add_cron_job(request_dict, response):
|
|
|
task_id = request_dict.get('task_id', None)
|
|
|
+ timezone_offset = float(request_dict.get('timezone_offset', None))
|
|
|
hour = request_dict.get('hour', None)
|
|
|
minute = request_dict.get('minute', None)
|
|
|
day_of_week = request_dict.get('day_of_week', None)
|
|
|
- apscheduler_obj = ApschedulerObject()
|
|
|
- apscheduler_obj.cron_job(task_id, day_of_week, hour, minute)
|
|
|
+ apscheduler_obj = ApschedulerObject(timezone_offset)
|
|
|
+ apscheduler_obj.create_cron_job(apscheduler_obj.auto_hello, task_id, day_of_week, hour, minute, ('date', ))
|
|
|
return response.json(0)
|
|
|
|
|
|
@staticmethod
|
|
@@ -1073,7 +1074,7 @@ class testView(View):
|
|
|
time_stamp = request_dict.get('time_stamp', None)
|
|
|
time_stamp = int(time_stamp)
|
|
|
apscheduler_obj = ApschedulerObject()
|
|
|
- apscheduler_obj.date_job(task_id, time_stamp)
|
|
|
+ apscheduler_obj.create_date_job(apscheduler_obj.auto_hello, task_id, time_stamp, ('date', ))
|
|
|
return response.json(0)
|
|
|
|
|
|
@staticmethod
|