6

【茶包射手日記】錯過開始時間導致 Windows 循環排程無法執行

 2 years ago
source link: https://blog.darkthread.net/blog/missed-schtask-rejected-event-153/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
【茶包射手日記】錯過開始時間導致 Windows 循環排程無法執行-黑暗執行緒

發現 Windows 工作排程器有個出乎我預料的行為。

有個每天 08:00 起每 10 分鐘跑一次到下午 18:00 的 Windows 排程,設定只有在使用者登入時才執行,平日若在 08:00 前登入 Windows 一切正常。今天因故中午 12:23 分左右才登入 Windows,發現排程就不跑了。

我心中預期的排程行為是跳過 08:00 ~ 12:20 這幾次,從 12:30、12:40、12:50、13:00... 但由歷程來跑,排程是跑在 12:36、12:45、12:56、13:06、13:16、13:26、13:36...,執行結果為 操作員或系統管理員已拒絕此要求/The operator or administrator has refused the request. (0x800710E0) 並得到 Event ID 153 警告 / 啟動錯過排程之工作的要求遭拒 (Missed task start rejected) - 無法啟動工作"XXXX",因為該工作已錯過其排程。請考慮設定選項在錯過排程時啟動工作(如果可用) / Task Scheduler did not launch task "XXXX" as it missed its schedule. Consider using the configuration option to start the task when available, if schedule is missed.。

依循指示勾選了「在錯過排定的啟動後快執行工作/Run task as soon as possible after a scheduled start is missed」,13:38 完成設定,13:40 起恢復正常執行。

爬了文,這似乎是個 Bug,會發生在日光節約時間(Daylight Saving Time)切換或啟動時間剛好設成 GMT 00:00 的案例 (From what I recall, we were speculating that the change to/from Daylight Saving Time, and/or scheduling a task to run at exactly at the local time that corresponds to midnight GMT time may also play a role. 來源),台北時間 08:00 剛好等於 GMT 00:00,BINGO!

除了勾選「在錯過排定的啟動後快執行工作」,還有一個解法是設定時間時勾選「同步處理不同時區」:

感覺又是個冷門問題,寫下來留給有緣人參考。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK