The parameters of crontab are described in detail and how to view the syntax of the crontab log for future emergency. First, let's look at the super powerful figure: crontab parameter description:-e: execute the text editor to edit crontab. The final text editor is VI-r: delete the current crontab-l: listing the current... the parameters of crontab are described in detail and how to view the syntax of the crontab log for future emergency. First, let's look at the super powerful figure: crontab parameter description:-e: execute the text editor to edit crontab. The final text editor is VI-r: delete the current crontab-l: list the current crontab (dedicated for viewing)-I: It will be used with-r. when you delete the current crontab, ask. if you enter y, delete it. Note that crontab is user-specific, the crontab special symbol "*" indicates the number in the range of all values. Pay special attention to it! "/" Indicates the meaning of each, for example, "*/5" indicates that each five units "-" indicates that a number is transferred from a number to a number." "example of how to use the scattered number crontab File: 30 21 *** indicates 45 4, 10, 22 *** every night, indicating 4 of Day 1, 10, and 22 of every month: 45 10 1 ** 6, 0 indicates to every Saturday and Sunday: every 30 minutes between 00 0 23 ** 6 indicates the 11 of every Saturday: 00 pm **/1 *** every hour * 23-7/1 *** between pm and am, every hour * 8, 13 ** 1-5 from Monday to Friday eight o'clock A.M. and one o'clock P.M. 0 11 4 * mon-wed 4 of every month and 0 4 jan * from Monday to Wednesday * on March 13, January 1 ------ how to view crontab log records ------- yesterday The synchronization task in crontab is not executed. I don't know why it was not executed. it seems that the task hang is running. I want to check the problem of crontab or where the hang is. 1. in linux, you can view the/var/log/cron file. you can use tail-f/var/log/cron to observe it. 2. unix contains the croutXXX001864 tmp file in the/var/spool/cron/tmp file, and the running tasks can be seen in the tail files. 3. the mail task contains crontab execution logs in the/var/spool/mail/root file, use tail-f/var/spool/mail/root to view the latest crontab execution.
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.