Brief introduction
The crontab command is common in UNIX and unix-based operating systems, and is used to set periodically executed instructions. This command reads the instruction from the standard input device and stores it in a "crontab" file for later reading and execution.
Typically,
the more command to view the file content and find that there are three lines of information in the file header:
# Do not edit this file-edit the master and reinstall.
# (Test. cron installed on Mon Feb 22 14:20:20 1999)
# (Cron version -- $ ID: crontab. C, V 2.13 1994/01/17 03:20:37 vivie exp $)
The approximate meaning is:
# Do not edit this file-if you need to change it, edit the source file and reinstall it.
# Test. Cron File Installation time: 14
the output of the script to a temporary file.
Copy the Code code as follows:
*/5 * * * */usr/bin/curl-o temp.txt http://www.jb51.net/myscript.php
The following example uses the wget access URL to execute PHP scripts every 10 minutes. The-q option indicates quiet mode. "-O Temp.txt" indicates that the output is sent to a temporary file.
Copy the Code code as follows:
*/10 * * * */usr/bin/wget-q-o temp.txt http://www.jb51.net/myscript.php
The above describes how the
For example, to view your cron settings as root: crontab-u root-lFor another example, Root wants to delete Fred's cron settings: crontab-u Fred-RWhen editing the cron service, the edited content has some formats and conventions. Enter crontab-u root-e.In VI editing mode, the edited content must conform to the following form
3. Accumulated Linux/UNIX operation commands (gzip, jar, tar, find, crontab) and gzipcrontab
In Linux/UNIX, users often use text interfaces to set up systems or operating systems. The author is constantly working on these commands, therefore, this article has been specially developed, prepared, and started. This article mainly records some of the operating comman
Iii. Linux/UNIX operating command accumulation [gzip, jar, tar, find, crontab]
In Linux/UNIX, users often use text interfaces to set up systems or operating systems. The author is constantly working on these commands, therefore, this article has been specially developed, prepared, and started. This article mainly records some of the operating commands you encount
lines of information in the file header:# Do not edit this file-edit the master and reinstall.# (Test. cron installed on Mon Feb 22 14:20:20 1999)# (Cron version -- $ ID: crontab. C, V 2.13 1994/01/17 03:20:37 vivie exp $)The approximate meaning is:# Do not edit this file-if you need to change it, edit the source file and reinstall it.# Test. Cron File Installation time: 14: 20: 20 02/22/1999If you want to change the command content, you need to re-e
under the use of Linux/unix, often using the text interface to set up the system or operating system, the author himself in the process of work is also in constant contact with this command, so for This special brewing, preparation, began the writing of this article. This paper mainly records some of their usual linux/unix under the operation of commands, record and collation, one can deepen the image, two
It is very common to use crontab timers in the usual server management, but there are several issues to be aware of when using them:1, to pay attention to the format of the Crontab 5 * must not be written wrong, the internet to find a picture can be very intuitive to identify the crontab * value problem:650) this.width
Crontab is a convenient way to regularly (cyclically) execute a task on Unix/Linux systems.Program Basic usage:1. crontab-lList the current crontab task2. crontab-dDelete the current crontab task3.
Unix You cannot set up an operation plan using crontabCrontab in the system for example, settings occur in the following phenomena:Workaround:EditCronFile Contents:#EDITOR =vi#export EDITOR ( will beVIset as the default file editor)When you edit a task, the default editor isVI(Note: If you land again, you have to set it again.) However, the statement can be added to the environment variable, so that it can be used directly after each time the machine
Consider the memory footprint. if your single tasks share nothing or little, then it might be better to run them from the operating system as a separate process. if they share a lot of information, it's better to have them as threads within one process. quartz occupies less memory and executes multiple tasks in a single process, while cron is a separate process.
Not quite sure how you cocould handle the clustering incronApproach.QuartzMight be used with terracotta following the scaling out pa
On the Swagger UI model schema, the field date is displayed as "date": "2018-10-15t09:10:47.507z" but I need to use it as "date": "2018-9-26 12:18:48".Tips: The following two formats are just simple to understand a bit is not very comprehensive, there is insufficient or wrong place please point out.ProblemFirst look at Swagger the date type is displayed by default (the current date that the sample code displays by default may not be the same as the one shown later)This is the "Date data
Crontab format and detailed example format: *** command indicates that the 1st column of the day-month-week command indicates minute 1 ~ 59 every minute, use * or */1 to indicate 2nd columns to indicate hour 1 ~ 23 (0 indicates 0 points) column 3rd indicates date 1 ~ 31 column 4th indicates the month 1 ~ 12 5th columns... cro
Basic Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th columns of commands to run
Some examples of
Basic Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th columns of commands to run
Some examples of
From: http://blog.csdn.net/ethanzhao/article/details/4406017
Basic Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th colu
Basic Format:
* *** Command
Hour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.
The first column indicates the hour 1 ~ 23 (0 indicates 0 points)
The 3rd column indicates the date 1 ~ 31
The 4th column indicates the month 1 ~ 12
The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)
6th columns of commands to run
Some examples of
Format:* *** CommandHour, day, month, and week commands
The 1st column indicates minute 1 ~ 59. Each minute is represented by * or */1.The first column indicates the hour 1 ~ 23 (0 indicates 0 points)The 3rd column indicates the date 1 ~ 31The 4th column indicates the month 1 ~ 12The Identification Number of column 5th is from day of the week to day ~ 6 (0 indicates Sunday)6th columns of commands to run
Some examples of
Linux crontab Command Format and example
Linux crontab Command Format and example
Run */5 * every five minutes ****
0 *** per hour ****
Execute 0 0 every day ***
Execute 0 0 every week ** 0
0 0 1 per month **
Execute 0 0 1 1 * every year *
For detailed usage, refer
1. RoleYou can use 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.