In Linux, tasks can be configured to run automatically within a specified period of time, on a specified date, or when the system load average is below a specified number.

Red Hat Enterprise Linux is pre-configured to run important system tasks to keep the system updated. For example, the locate database used by the locate command is updated daily. A system administrator can use automated tasks to perform periodic backups, monitor the system, run custom scripts, and more.

Red Hat Enterprise Linux comes with several automated tasks utilities: cron, at, and batch.

Cron Jobs:

The cron daemon is a long running process that executes commands at specific dates and times. To schedule one-time only tasks with cron, use at or batch. For commands that need to be executed repeatedly (e.g. hourly, daily or weekly), use crontab, which has the following options:

crontab filename         Install filename as your crontab file.
crontab -e          Edit your crontab file.
crontab -l          Show your crontab file.
crontab -r          Remove your crontab file.
[email protected]          Emails the output to the specified address.

The crontab command creates a crontab file containing commands and how often cron should execute them. Each entry in a crontab file consists of six fields, specified in the following order:

minute(s) hour(s) day(s) month(s) weekday(s) command(s)

Note: Learn here how to use the Cron jobs in cPanel?

in C

Leave A Comment