Crontab File:

Crontab is a file which consists all the schedule of cron entries. And it’s executed all the cron jobs at the specified times. Here you will see the Crontab file.

What is Cron Job?

Cron allows Linux users to run commands or scripts at a given date and time. It typically automates system administration. Cron is the most powerful tool in Linux. Cron wakes up every minute and checks schedule tasks in cron table. It is usually used for system administration jobs such as backups or cleaning /tmp/ directories and more.

The cron service runs in background and constantly check /etc/crontab file and /etc/cron.*/ directories. It also checks the /var/spool/cron/ directory.

The Syntax for Cron Jobs as follows:

1 2 3 4 5 /path/to/command arg1 arg2.


1 represents minute,

2 represents hours,

3 represents a day,

4 represents the month and

5 represents the day of the week.

/path/to/command -script or command name to schedule.

Example: 00 11,16 * * * /home/ramesh/bin/incremental-backup

Use command crontab -l to check the assigned the cron job.

To delete the cron job, simply type crontab -e to edit the crontab and open using VI editor and delete the cron line.
To delete entire cronjob type crontab -r, Now all the cronjobs will be deleted.

Crontab in cPanel and Plesk on Linux Operating System:

Categorized in:

Tagged in:

, , ,