From 3dffcadb9c47ca3b6018f5e5ffbce854dade97e5 Mon Sep 17 00:00:00 2001 From: miguelfontanes Date: Fri, 1 Nov 2013 11:25:00 -0400 Subject: [PATCH] Update scheduler.py Add date/time to log --- webnotes/utils/scheduler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webnotes/utils/scheduler.py b/webnotes/utils/scheduler.py index 248db8574a..a1a173ec51 100644 --- a/webnotes/utils/scheduler.py +++ b/webnotes/utils/scheduler.py @@ -46,18 +46,18 @@ def execute(site=None): if nowtime.day != last.day: # if first task of the day execute daily tasks - out.append('daily:' + trigger('execute_daily')) + out.append(nowtime.strftime("%Y-%m-%d %H:%M:%S") + ' - daily:' + trigger('execute_daily')) if nowtime.month != last.month: - out.append('monthly:' + trigger('execute_monthly')) + out.append(nowtime.strftime("%Y-%m-%d %H:%M:%S") + ' - monthly:' + trigger('execute_monthly')) if nowtime.weekday()==0: - out.append('weekly:' + trigger('execute_weekly')) + out.append(nowtime.strftime("%Y-%m-%d %H:%M:%S") + ' - weekly:' + trigger('execute_weekly')) if nowtime.hour != last.hour: - out.append('hourly:' + trigger('execute_hourly')) + out.append(nowtime.strftime("%Y-%m-%d %H:%M:%S") + ' - hourly:' + trigger('execute_hourly')) - out.append('all:' + trigger('execute_all')) + out.append(nowtime.strftime("%Y-%m-%d %H:%M:%S") + ' - all:' + trigger('execute_all')) return '\n'.join(out)