Stage 1 · Lesson 8 of 10
Scheduling with cron and systemd timers
runs commands on a schedule. Each line in a crontab (your list of scheduled jobs) has five time fields: minute, hour, day of month, month and day of week. The command comes after them.
So 0 2 * * * /opt/backup.sh runs at 02:00 every day. Edit your own list with crontab -e, and check expressions with a tool such as crontab.guru. systemd timers do the same job with better logging. They can also catch up on runs missed while the machine was off.
Scheduled jobs are where backups, cleanup and reports live. Later they become and scheduled pipelines.
Common trapThe traps are that cron runs with a bare minimum environment, so a command that works in your terminal can fail for lack of a PATH, and that failed jobs are silent unless you send their output somewhere you will actually see it.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
Shell, scripting, data wrangling, SSH and Git in a dozen focused lectures
- BookFreeThe Linux Command Line
William Shotts · Beginner
Free book: permissions, processes, packages and longer shell scripts, chapter by chapter