Linux crontab command and linuxcrontab command
I. Introduction
Crond is a daemon in linux that is used to periodically execute a task or wait for processing some events. It is similar to a scheduled task in windows. After the operating system is installed, by default, the service tool is installed and the crond process is automatically started. The crond Process regularly checks whether there are tasks to be executed every minute. If there are tasks to be executed, the task is automatically executed.
In Linux, task scheduling is divided into two types: System Task Scheduling and user task scheduling. There is a crontab file under the/etc directory, which is the configuration file for system task scheduling. Task Scheduling: You can use the crontab tool to customize your scheduled tasks. All user-defined crontab files are saved in the/var/spool/cron directory. The file name is the same as the user name.
Ii. Syntax
usage: crontab [-u user] file crontab [-u user] [ -e | -l | -r ] (default operation is replace, per 1003.2) -e (edit user's crontab) -l (list user's crontab) -r (delete user's crontab) -i (prompt before deleting user's crontab) -s (selinux context)
Description format of each task in the/etc/crontab file:
minute hour day month dayofweek command
Where
Minute-integer hour from 0 to 59-integer day from 0 to 23-integer from 1 to 31 (must be the valid date of the specified month) month-an integer from 1 to 12 (or a month abbreviated as Jan or Feb) dayofweek-an integer from 0 to 7, 0 or 7 is used to describe Sunday (or abbreviated as Sun or Mon) command-command to be executed (as ls/proc>/tmp/proc or command to execute custom scripts)
Command can contain root and run-parts. The meaning is as follows:
"Root" indicates running run-parts as the root user. It indicates that a folder is followed by all the scripts in the folder.
Iii. Instances
http://blog.csdn.net/ethanzhao/article/details/4406017
Parameters: http://www.cnblogs.com/peida/archive/2013/01/08/2850483.html