Fixes tagged Task Scheduler
3 fixes · back to all fixes
A log write killed the job it was logging, and the exit code still said 0
$ErrorActionPreference = 'Stop' is the setting every PowerShell guide recommends. It also promotes a failed Add-Content into a terminating error, so a file lock on the log file aborts the run from a line that does not matter, in the middle of work that does.
3 min read →
schtasks says the task is disabled, Get-ScheduledTask says Ready, seconds apart
AVG Gaming Mode mass-disables every Windows scheduled task and re-enables them minutes later. The trigger is not a game: browsers sit in the Gaming Mode app list, so any headless-browser automation does it to you.
6 min read →
Scheduled task Last Result 2147020576 on a task that runs perfectly by hand
0x80070420 does not mean the task ran and failed. It means the trigger was missed because the machine was asleep, and Last Result is sticky, so a weekly task reports the same failure every day until its next run.
4 min read →