What is centos crontab? I am about to install centos on my computer. I was just going through the features and i came acros this thing crontab. What is it? What does it do? Just a curious noob. So please help...![]()
What is centos crontab? I am about to install centos on my computer. I was just going through the features and i came acros this thing crontab. What is it? What does it do? Just a curious noob. So please help...![]()
Cron is a time-based job scheduler in Unix-like computer operating systems. 'cron' is short for 'chronograph'. Cron enables users to schedule jobs (commands or shell scripts) to run automatically at a certain time or date. It is commonly used to perform system maintenance or administration, though its general purpose nature means that it can be used for other purposes, such as connecting to the Internet and downloading email...
The default contents of the main config file of crontab contains the following content :
Crontab is basically used for scheduling programs or applications to run at a specific time similar to windows task scheduler. Hope this helps you...Code:SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly![]()
Example of crontab's usage :
For complete detail visit redhat's official site. CentOS is derived from redhat so no issues of changes in feature. See the complete documentation : http://www.redhat.com/docs/manuals/l...cron-task.htmlCode:# record the memory usage of the system every monday # at 3:30AM in the file /tmp/meminfo 30 3 * * mon cat /proc/meminfo >> /tmp/meminfo # run custom script the first day of every month at 4:10AM 10 4 1 * * /root/scripts/backup.sh
Bookmarks