Add a timer in Linux

Source: Internet
Author: User

 

1. Execute crontab-e directly in the command line.

2. Add the execution script statement, for example:

# Test for project-name to send email to admin, add by *** (2011-11-10)

0, ***/email. Sh

Note that when you add a new timer, you will have a good habit of adding a comment, indicating the role, Creation Time, And creator.

If you want to learn how to add an automatic execution script command, you can view the following three urls:

Http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/

Http://adminschoice.com/crontab-quick-reference

Http://baike.baidu.com/view/1229061.htm

Http://www.blogjava.net/xiaomage234/archive/2007/12/26/170490.html

3. Save and exit (if you want to take effect immediately, remember to: WQ. If you do not exit editing, it will not be installed and executed)

4. After saving, you can see the following information, indicating that the timer is successfully added.

Note: In the automatic execution script, all executions must be written to the full path! For example, to execute a PHP script in the script, you must use/usr/local/PHP/bin/PHP test. php.

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: info-contact@alibabacloud.com 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.