cron

The Unix and Linux service that runs commands automatically on a schedule, such as every night at two in the morning.

In more detail

Each schedule entry, stored in a crontab, lists minute, hour, day of month, month and day of week, followed by the command to run. Jobs run with almost no environment, with a minimal PATH and no terminal, so use full paths and send output to a log file. Cron runs backups, log rotation and clean-up jobs, and attackers also use it to make their code start again after a reboot.

Examples

17 3 * * 1
schedule: "0 2 * * *"   # 02:00 every day
0 2 * * * /usr/local/bin/backup.sh
Sep 27 09:15:01 web01 CRON[4170]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
A Falco exception allows the nightly backup whose parent process is cron.

Related terms

Taught in

References

Certification courses