MR.AspNetCore.Jobs
MR.AspNetCore.Jobs copied to clipboard
Ability to select timezone or using server time
It would be create, if the schedule could be changed to use either the local server time. As my system in is in Europe, I need to configured the schedule with an offset. Thanks for considering for a future version :-)
Sorry I haven't seen this until now for some reason (a full year later!).
Are you talking about scheduling a delayed job and giving the due date? If so, the method already takes a DateTimeOffset
, right? So maybe I'm misunderstanding.
I had this issue as the scheduler is using UTC. My system however is in CET (which is -1 hour from UTC and 2 hours to EST during the summer).
I adjusted the scheulded hour (my jobs need to run at a certain time during the day).
For the summertime, I added an adjust like this:
int summerTimeAdjust = TimeZoneInfo.Local.IsDaylightSavingTime(DateTime.Now) ? 1 : 0;
So my schedule looks like this:
Cron.Weekly(DayOfWeek.Tuesday, 6 + summerTimeAdjust)
Oh we're talking about cron jobs. Yeah I see, I realize now that I should have allowed for a timezone. This is a valid issue.