CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

Scheduled Tasks with cron

Part of one objective that names cron, at and timer units together. cron is the oldest and still the fastest to write. The detail that catches people is that a user crontab has five fields before the command and a system crontab has six - the extra one being the user to run as.

Deploy and Maintain Guide 43 of 67 Beginner

Written against the versions above. The package is **cronie** and the service is **crond**. `crontab -e` edits your own; `crontab -e -u <user>` edits somebody else's and needs root. Never edit `/var/spool/cron/<user>` directly - `crontab` validates the syntax and reloads, and a hand-edited file can be silently ignored.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0 (Coughlan)Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

Before you start

  1. The format

  2. A user crontab

  3. System crontabs, and the sixth field

  4. Shorthand, and checking it ran

Official sources