Scheduling a task to run automatically
A scheduler that runs a command or script at set times without a person starting it, such as a nightly backup. Windows Task Scheduler does the same job.
Understanding Scheduling a task to run automatically in WA Computer Science ATAR Unit 1
What it does: The minute is 30, the hour is 23 (11 pm), and the last field 5 means Friday. The two stars in the middle mean every day of the month and every month. The schtasks command creates a Task Scheduler task. /tn names it, /tr gives the program to run, /sc daily sets the schedule and /st 22:00 sets the start time, so it runs without a person starting it. A scheduler starts the task for you at the times you set, so no one has to remember to run it. cron is the scheduler on Linux and macOS. Windows uses Task Scheduler for the same job.
Common mistakes: A cron expression needs five time fields (minute, hour, day of month, month, weekday). This line has only four, so cron reads the path as a field. It should be 0 2 * * * before the command. The fourth field is the month, so this job would only run in January. Monday is set in the fifth (weekday) field, so the line should be 0 5 * * 1.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 315–470) and word search (Modules 100–470).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
cronFill in the Blanks
Spot the Error
Student with a class code? Join your class →