Solution to Update Task Scheduler Start Times to Account for Daylight Savings

New Contributor III


This time of year we have the common maintenance point regarding needing to update task scheduler start times to account for daylight savings. It is expected for the platform to not automatically update the task start times to account for daylight savings, thus, this becomes a maintenance point for those companies in states/countries that utilize daylight savings. Until this feature perhaps one day becomes available in the platform, we have a custom solution that will make the maintenance point of this easier for OS administrators. 

You can upload the two files attached in the zip file which will result in uploading an Extender business rule titled "Update_TaskScheduler_StartTimes" and a Data Management job called "Update Task Start Time Daylight Savings".

To use the solution, navigate to the Data Mgmt page and look for the group titled "Task Scheduler Maintenance". Here you will find the Data Mgmt sequence and step you uploaded.

Navigate to the DM step and utilize the Hour Adjustment parameter to push the task start times backwards (-1) or forward (1) one hour. UpdateTasksDaylightSavingsDMStep.png

Once you are happy with the Data Mgmt step setting, go ahead and run the Update Task Start Time Daylight Savings sequence. The sequence will update the task start time for all tasks in the application.

We recommend testing this in a Development application first. Please perform this at your own risk in a Production application.





Community Manager
Community Manager

Nice one, Nick!

For the curious, the core of the code looks like this:

Dim dmSchedItem As List(Of DataMgmtScheduleItemEx) = _
	DataMgmtScheduleWcf.GetScheduledJobs(dbConnFW, dbConnApp, False)

For Each schedJob As DataMgmtScheduleItemEx In dmSchedItem

	'adjust the start time based on what the user defines
	schedJob.DataMgmtScheduleItem.StartTime = _

	' Function SaveScheduledJob(dbConnFW As DbConnInfo,dbConnApp As DbConnInfo,isNew As TriStateBool)
	DataMgmtScheduleWcf.SaveScheduledJob( _
		dbConnFW, dbConnApp, schedJob.DataMgmtScheduleItem, TriStateBool.FalseValue)


That surfaces an interesting API to DM jobs that can have interesting applications. Cheers!


Thank you this is very useful information

Please sign in! NickKroppe