Quartz.net setting the timezone for ITrigger?

c#, quartz-scheduler, quartz.net

Solution

There should be a TimeZone option when creating your trigger. Something like this:

.inTimeZone(TimeZone.CurrentTimeZone);

The above will take the server's current timezone. If not a UK based server, this should work.

TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");

Here is the link: http://quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06

Problem

``` ITrigger cronTrigger = TriggerBuilder.Create() .WithIdentity("trigger1", "group1") .WithCronSchedule(0 0/1 * 1/1 * ? *) .Build(); ``` This code sets the time to run an hour before I want it to, so rather than running at 1:40 it runs at 12:40. Can I set the timezone of Itrigger to work for uk time ?

Original source