Hypervisor sets timezone to UTC
Chef cookbook joins to domain
VM reboots
On reboot, group policy is applied, changing time zone to Eastern
cookbook scheduled task will run once, but not the second time
Cause
Under advanced settings, the task sometimes gets the check box "Activate"
Since the Activate is in UTC time, the task won't run until several hours in the future.
Microsoft seems to think that run at 'reboot' really means ' run at reboot and after x time'
Possible solutions
powershell script to clear activate setting.
add feature to chef windows task support to clear this setting
refresh the time before creating scheduled task
manually set the start time to some time guaranteed to be in the past
Scenario
Hypervisor sets timezone to UTC Chef cookbook joins to domain VM reboots On reboot, group policy is applied, changing time zone to Eastern cookbook scheduled task will run once, but not the second time
Cause
Under advanced settings, the task sometimes gets the check box "Activate" Since the Activate is in UTC time, the task won't run until several hours in the future. Microsoft seems to think that run at 'reboot' really means ' run at reboot and after x time'
Possible solutions