Cron – Configure Recurring jobs

linux

The cron application enabled users to run recurring jobs utomatically. It can include taking a backup at 03:00 AM every day, capturing users who have logged in at 5:00 PM, etc.

The daemon that  runs cron job is crond.

The crontab (Cron Table) creates a table or list of commands. Each of these commands is to be executed by the operating system at a specified time and on a regular schedule.

The below command displays the configured cron jobs.

[root@centos9vm ~]# crontab -l
01 01 * * * /home/scripts/CalendarReminder/reminderAlarm.sh
01 03 * * * /usr/bin/rsync -azv –delete /home/fire/public_html/ /home/fire/backup
01 02 * * * /usr/bin/mysqldump -u root -h localhost -pABC123 –all-databases > /root/all_db-daily.sql

====== ==

Crontab

 

[root@centos9vm ~]# crontab -e

The above command enables users to add and edit cron jobs. The interface and commands are similar to that of vi editor.

The command to remove all entries in cron is as follows.

[root@centos9vm ~]# crontab -e