Administrators automate recurring and one-off jobs so that backups, cleanups and reports happen without anyone logged in. Linux offers three mechanisms: cron for recurring jobs, at for single future jobs, and systemd timers as the modern alternative to cron. The exam checks that you can read and write their time expressions and that you know where each kind of job is defined. A crontab line has five time fields followed by the command: minute (0-59), hour (0-23), day of month (1-31), month (1-12) and day of week (0-7, where 0 and 7 are both Sunday). An asterisk means every value, a comma separates a list (1,15), a hyphen gives a range (1-5), and a slash gives a step (*/10 means every tenth value). So 30 2 * * 1-5 /usr/local/bin/backup.sh runs at 02:30 Monday through Friday, and */15 * * * * runs every 15 minutes. Shortcuts such as @reboot, @daily and @hourly also exist.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.