Skip to content

Commit

Permalink
Update report Scheduled Task Summary to calculate via UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-pond committed Mar 31, 2022
1 parent 25e92df commit b7fda9a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"filters": [],
"idx": 0,
"is_standard": "Yes",
"modified": "2021-12-17 15:48:24.757554",
"modified": "2022-03-26 02:59:13.080158",
"modified_by": "Administrator",
"module": "BTU_Core",
"name": "BTU Scheduled Task Summary",
"owner": "Administrator",
"prepared_report": 0,
"query": "SELECT\n\t TaskSchedule.name AS \"Schedule ID:Link/BTU Task Schedule:100\"\n\t,TaskSchedule.task AS \"Task ID:Link/BTU Task:100\"\n\t,TaskSchedule.task_description AS \"Task Description:Data:200\"\n\t,TaskSchedule.schedule_description AS \"Schedule Description:Data:200\"\n\t,drv1.date_time_started\t\tAS \"Last Run On:Data:150\"\n\t,drv1.execution_time\t\t\tAS \"Last Duration (secs):Data:150\"\n\t,drv1.success_fail\t\t\tAS \"Last Result:Data:150\"\n\t,TIMESTAMPDIFF(HOUR,drv1.date_time_started\t,now())\t\tAS \"Hours Since Last:Data:150\"\nFROM\n\t`tabBTU Task Schedule`\tAS TaskSchedule\n\nLEFT JOIN\t\n\t(\n\tSELECT schedule, date_time_started, execution_time, success_fail,\n\tROW_NUMBER() OVER (ORDER BY schedule, date_time_started DESC) - \n\tRANK() OVER (ORDER BY schedule) \tAS occurrence\n\t\n\tFROM `tabBTU Task Log`\tAS TaskLog\n\t) drv1\n\t\nON\n\tdrv1.schedule = TaskSchedule.name\nAND drv1.occurrence = 0\n\t\nWHERE\n\tTaskSchedule.enabled = 1\n",
"query": "SELECT\n\t TaskSchedule.name AS \"Schedule ID:Link/BTU Task Schedule:100\"\n\t,TaskSchedule.task AS \"Task ID:Link/BTU Task:100\"\n\t,TaskSchedule.task_description AS \"Task Description:Data:200\"\n\t,TaskSchedule.schedule_description AS \"Schedule Description (UTC):Data:200\"\n\t,DATE_FORMAT(drv1.date_time_started, \"%W, %M %d %Y @ %h:%m:%s %p\") AS \"Last Run On:Data:150\"\n\t,drv1.execution_time\t\t\tAS \"Last Duration (secs):Data:150\"\n\t,drv1.success_fail\t\t\tAS \"Last Result:Data:150\"\n\t,TIMESTAMPDIFF(HOUR, drv1.date_time_started, CONVERT_TZ(UTC_TIMESTAMP, 'UTC', 'America/New_York'))\t\tAS \"Hours Since Last:Data:150\"\nFROM\n\t`tabBTU Task Schedule`\tAS TaskSchedule\n\nLEFT JOIN\t\n\t(\n\t# Times here are Eastern.\n\tSELECT schedule, date_time_started, execution_time, success_fail,\n\tROW_NUMBER() OVER (ORDER BY schedule, date_time_started DESC) - \n\tRANK() OVER (ORDER BY schedule) \tAS occurrence\n\t\n\tFROM `tabBTU Task Log`\tAS TaskLog\n\t) drv1\n\t\nON\n\tdrv1.schedule = TaskSchedule.name\nAND drv1.occurrence = 0\n\t\nWHERE\n\tTaskSchedule.enabled = 1\n",
"ref_doctype": "BTU Task Log",
"report_name": "BTU Scheduled Task Summary",
"report_type": "Query Report",
Expand Down

0 comments on commit b7fda9a

Please sign in to comment.