poshbotio / PoshBot

Powershell-based bot framework
MIT License
536 stars 108 forks source link

Scheduled Task not respecting Daylight Savings (DST) #238

Open clee1107 opened 2 years ago

clee1107 commented 2 years ago

Have two (2) scheduled actions. As of Sunday (Nov. 7) they are both triggering 1 hr earlier than they should.

Expected Behavior

Tasks should trigger at 5:30AM and 11AM

Current Behavior

Tasks are trigger at 4:30AM and 10AM

Possible Solution

Steps to Reproduce (for bugs)

  1. Scheduled task set prior to DST
  2. DST Occurs
  3. Task triggers +/- hour depending on DST action

Context

Running Set-Schedule appears to be a work around.

devblackops commented 2 years ago

Thanks @clee1107. Probably a bug with how PoshBot calculates the next schedule run time based on the interval, the current date, and the last time it ran.

Have you tried restarting PoshBot, and is the schedule still off by an hour?

clee1107 commented 2 years ago

@devblackops Tried to restart service no change.

Agree looks like interval issue as once used Set-Schedule command fixed them. Guessing reset the interval to account for the hour change.