Scheduling
Scheduling: Scheduled Tasks, Scripts That Run Without You.
Updated
- Scheduled Tasks (Journeyman): A scheduled task is Windows' alarm clock for programs, a trigger that says when and an action that says what to run, built with New-ScheduledTaskTrigger and New-ScheduledTaskAction, handed to Task Scheduler with Register-ScheduledTask, and checked with Get-ScheduledTask.
- Scripts That Run Without You (Freelancer): A script run by a scheduled task has nobody to answer its questions and doesn't start in its own folder, so it takes parameters instead of asking, builds its paths from $PSScriptRoot, leaves a dated log and a Start-Transcript recording, ends with an honest exit code, and runs as the account the task names.