Event Task Schedule ExecuteTask() local Server time

Posted by Community Admin on 04-Aug-2018 12:45

Event Task Schedule ExecuteTask() local Server time

All Replies

Posted by Community Admin on 26-Apr-2012 00:00

I have created custom event module based on www.sitefinity.com/.../creating-the-task

All works fine except that the ExecuteTask() method is called after an hour (I suppose its not taking server time/British Summer Time  but always following UTC time)
e.g. If I schedule event to be published at 10.00am it gets published at 11.00am
i.e. if I set ExecuteTime to be 10am, The ExecuteTask() method is invoked at 11.00am

Posted by Community Admin on 02-May-2012 00:00

I'm experiencing similar issue, only that my time zone is Easter Time and it moves 6 hours, not 1.

Posted by Community Admin on 03-May-2012 00:00

At the bottom of this page, there is a small, yet helpful, note:

NOTE:
 You must set all date and time values in a UTC format in Sitefinity.

I was doing this same thing the other day. In my case, I was publishing things 5 minutes from when the task was run so my code looked like this:

dynamicModuleManager.Lifecycle.PublishWithSpecificDate(tItem, DateTime.UtcNow.AddMinutes(5));

This thread is closed