$linuxjunkies
>

CronJob

also: cron job, crontab job, scheduled task

A scheduled task that runs automatically at specified times or intervals on a Linux system, managed by the cron daemon.

A CronJob is a time-based job scheduler in Linux that executes commands or scripts automatically according to a predetermined schedule. The cron daemon runs continuously in the background and checks the crontab (cron table) files to determine which tasks should run at any given moment.

Cron jobs are defined in a user's crontab file, edited via the crontab -e command. Each line specifies a command and when it should execute using a five-field time specification: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6). For example, 0 2 * * * /usr/local/bin/backup.sh runs the backup script daily at 2:00 AM.

Common uses include automated backups, log rotation, system maintenance, and periodic report generation. Cron jobs run with the privileges of the user who owns them, and system-wide cron jobs can be placed in /etc/cron.d/ or subdirectories like /etc/cron.daily/.

Related terms