A cron job is a scheduled task that runs automatically at predefined intervals on Unix-based systems using the cron scheduler. It is commonly used for repetitive tasks such as system maintenance, backups, script execution, and automation of server-side processes. Cron jobs follow a specific time-based syntax that defines when and how often a command or script should be executed.
Also known as: Scheduled task, automated job
A developer sets up a cron job to back up a database every night at 2 AM by adding the following line to the crontab file:
This ensures that the database is automatically backed up daily without manual intervention, preventing data loss and improving system reliability.