crontab command Detailed Explanation
crontab command function is to a certain time interval scheduling of the implementation of some orders. In / etc directory has a crontab files, stored here are some of the system is running the scheduling process. Each user can create their own scheduling crontab.
crontab command has three forms of command-line structure:
crontab [-u user] [file]
crontab [-u user] [-e |-l |-r]
crontab-l-u [-e |-l |-r] a command line, file is the order paper's name. If specified in the command line in this document, then the implementation of crontab command, this document will be copied to crontabs directory, if the command line in the absence of this document, crontab orders will be accepted standard input (keyboard) on the type of order, and They also will be stored in crontab directory.
Command line - r is the role of options from / usr / spool / cron / crontabs directory to delete user-defined document crontab;
Command line - l option is the role of the user crontab show the contents of the documents.
Use the command crontab-u user-e Order of the user edit user cron (c) operations. Users to edit the document to increase or revise any of the operations request.
Executive Order crontab-u user-r to delete all of the current user cron operations.
Operating with their scheduled time stored in the document / usr / spool / cron / crontabs / username Lane. username use username, in the corresponding documents stored in the users want to run the order. Order the implementation of the outcome, whether it is the standard error output or output, will mail to all users. The document must contain a request to separate spaces and tabs of the six domain. First five field can take the entire value of the designated date, the sixth domain is a string, called the order field, including the implementation of the crontab scheduling orders.
The first fifth of the field rounded range and significance is:
0 to 59 points that
1 to 23 hours that
1 to 31, said
1 to 12 that month
0-6 that week (of which 0 said Sunday)
/ usr / lib / cron / cron.allow Who can use the crontab command said. If it is an empty document that a user can not work arrangements. If this file does not exist, while another file / usr / lib / cron / cron.deny, only not included in this document may only use the user crontab command. If it is an empty document that can be arranged any user operations. At the same time when the existence of two documents cron.allow priority, if not exist, only super-users can arrange operations.














