Chapter 5
Scheduling tasks
Updated July 3, 2026
Some work repeats on a clock: clearing temporary files, backing up a database, refreshing the package list. Running it by hand every day wastes time and is a sure way to forget. Linux gives you two tools that do it for you: the old cron and systemd timers.
Start with cron. It is a service that wakes up once a minute and checks whether something is due to run. Your personal list of jobs lives in a file called the crontab. You do not edit it directly; there is a separate command.
$ crontab -e # open your crontab in an editor
$ crontab -l # show what is in it now
$ crontab -r # erase the whole crontab (careful, no confirmation)Each job line is five time fields and a command. The fields go left to righ
Locked
The rest of this chapter is part of a paid course
You are reading the open part. Buy the course to read the whole chapter.