Considerations for using Crontab under UNIX

Source: Internet
Author: User

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=650; "Src=" Http:// -wmp_4-s_286108073.png "title=" crontab file description. png "alt=" wkiom1fomaeite_5aaa3lpkgk7w891.png-wh_50 "/>

2, if the system crontab after the SendMail does not start, then the program executed in crontab has output content, the output will be sent to the user in the mail, the accumulation of files are saved in the/var/spool/clientmqueue directory, We can usually add >/dev/null 2>&1 after the statement with the output content, but sometimes there will always be missing, then we can use a small script scheduled 3 days to clean up the line.

1 */3 * */usr/local/scripts/[[email protected] scripts]# cat!/bin/bashcd/var/spool/ Clientmqueue/ls |xargs RM-RVF;

This article from the "Technical essay" blog, reproduced please contact the author!

Considerations for using Crontab under UNIX

Contact Us

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: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.