# command to install the new version when you edit this file
06
# and files in /etc/cron.d. These files also have username fields,
07
# that none of the other crontabs do.
08
09
SHELL=/bin/sh
10
PATH=/usr/
local
/sbin:/usr/
local
/bin:/sbin:/bin:/usr/sbin:/usr/bin
11
12
# m h dom mon dow user command
13
17 * * * * root
cd
/ run-parts --report /etc/
cron
.hourly
14
25 6 * * * root
test
-x /usr/sbin/anacron || (
cd
/ run-parts --report /etc/
cron
.daily )
15
47 6 * * 7 root
test
-x /usr/sbin/an
special characters:Asterisk (*): represents all possible values, such as the month field if it is an asterisk, the command action is executed monthly after the constraints of other fields are met.Comma (,): You can specify a list range with a comma-separated value, for example, "1,2,5,7,8,9"Middle Bar (-): An integer range can be represented by a middle bar between integers, such as "2-6" for "2,3,4,5,6"Forward slash (/): You can specify the interval
The previous day learned that the at command is for routine scheduled tasks that run only once, and that the Linux system is controlled by the cron (Crond) system service. Linux systems have a lot of planned work on them, so this system service is started by default. In addition, because the user can set up scheduled tasks themselves, the Linux system also provides a command for the user to control scheduled tasks: the crontab command.At the beginning
Original URL: http://www.cnblogs.com/peida/archive/2013/01/08/2850483.htmlThe previous day learned that the at command is for routine scheduled tasks that run only once, and that the Linux system is controlled by the cron (Crond) system service. Linux systems have a lot of planned work on them, so this system service is started by default. In addition, because the user can set up scheduled tasks themselves, the Linux system also provides a command for the user to control scheduled tasks: the
" means to perform every two hours. The forward slash can also be used with the asterisk, such as */10, which, if used in the minute field, means that it is executed every 10 minutes.
* * * * command
Time-sharing and Lunar Week commandThe 1th column represents minutes 1~59 per minute with * or */1The 2nd column represents the hour 1~23 (0 for 0 points)The 3rd column represents the date 1~31The 4th column represents the month 1~12The 5th list of the week 0~6 (0 for Sunday)6th column the command t
these fields, you can also use the following special characters:Asterisk (*): represents all possible values, such as the month field if it is an asterisk, the command action is executed monthly after the constraints of other fields are met.Comma (,): You can specify a list range with a comma-separated value, for example, "1,2,5,7,8,9"Middle Bar (-): An integer range can be represented by a middle bar between integers, such as "2-6" for "2,3,4,5,6"Fo
The Linux system is controlled by the cron (Crond) system service. Linux systems have a lot of planned work on them, so this system service is started by default. In addition, because the user can set up scheduled tasks themselves, the Linux system also provides a command for the user to control scheduled tasks: the crontab command.I. Introduction of CrondCrond is a daemon that is used to periodically perform certain tasks or wait for certain events u
Tags: apache2 GPO ima Common log evel ignore open loadThe Linux system is controlled by the cron (Crond) system service. Linux systems have a lot of planned work on them, so this system service is started by default. In addition, because the user can set up scheduled tasks themselves, the Linux system also provides a command for the user to control scheduled tasks: the crontab command.I. Introduction of CrondCrond is a daemon that is used to periodica
Reprint: https://www.cnblogs.com/intval/p/5763929.htmlThe Linux system is controlled by the cron (Crond) system service. Linux systems have a lot of planned work on them, so this system service is started by default. In addition, because the user can set up scheduled tasks themselves, the Linux system also provides a command for the user to control scheduled tasks: the crontab command.I. Introduction of CrondCrond is a daemon that is used to periodica
" to see more information.Task: List all of your scheduled tasksType the following command:# crontab-l# crontab-u Username-lTo delete all scheduled tasks, you can use the following command:# # # Delete current Scheduled TasksCrontab-r# # # Delete a timed task under a user's name, this command needs to be executed as root userCrontab-r-u usernameUse special strings to save timeYou can use one of the followin
Edit/etc/crontab File Configuration cronCron service every minute not only to read all the files within/var/spool/cron, but also to read a/etc/crontab, so we configure this file can also use the Cron service to do something. The crontab configuration is for a user, while the edit/etc/crontab is a task for the system. T
exactly the same as what we have just released CRONTAB-E! Just a few places are not quite the same:
Mailto=root:This project is to say, when the/etc/crontab of the routine work in this file is wrong, or if the result of the work is Stdout/stderr, who will the error message or the screen display message be passed to? By default, the system sends a mail message to root directly! However, because root and
...# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat# | | | | |# * * * * * user-name command to be executed
The first four rows are used to configure cron environment variables. The configuration of environment variables is not discussed here. The following content is a simple explanation of crontab usage.
You can use the crontab tool for your periodic tasks.
#/etc/crontab:system-Wide crontabGeneva# Unlike any and crontab you don'T has to run the ' crontab' to# command to install theNewVersion when you edit Thisfile .# and filesinch/etc/CRON.D. These files also has username fields, -# That's none of the other Crontabs Do. , theshell=/bin/SHTenpath=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin One A# m H Dom Mon Dow user command - -*
five items above can be used with the following four special symbols:
* Indicates all values, such as the first bit using * indicates every minute
/denotes each, as the first bit uses */5 to denote every 5 minutes
-Represents a range of values, as the second bit uses 2-4 to indicate 2 to 4 points
That represents a discrete number of values, such as the 2nd bit using 6,8 to represent 6 points and 8 points
Specify "step": 8-14/2 for 8,10,12,14
Specify a list: such as "1,2,3,4″," 0-4
, the echo $ path/usr/local/bin directory is clearly in the path. At this time, it is assumed that the environment variables used by cron are different from those used by shell, So Google, it is found that cron contains the following content in/etc/crontab:
Shell =/bin/shPath =/usr/bin:/usr/sbin:/bin:/usr/lib/news/binMailto = root## Check scripts in cron. Hourly, cron. daily, cron. weekly, and cron. Monthly
1. crontabIntroduction
The crontab command schedules the execution of some commands at certain intervals.
1.1/etc/crontab file
There is a crontab file in the/etc directory, which stores some scheduling programs that are running systematically. Each user can create their own scheduling crontab.
For example:
[Root @ D
Linux crontab command details, crontab command details
Crontab is a convenient command to execute a task in a scheduled (Cyclic) manner on unix/linux systems. The linux system is controlled by the cron (crond) System Service. The Linux system has a lot of planned work, so this system service is started by default. To understand the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.