Implement scheduled tasks in CentOs 7.0 (access webpages regularly)

Source: Internet
Author: User

Implement scheduled tasks in CentOs 7.0 (access webpages regularly)

1. Enter crontab-e to go to the editing page.
2. Input/2* ** Curlhttp: // www.baidu.com, indicating that the webpage is accessed every two minutes
3. Save and exit, and then start the service using service crond start.
4. Set chkconfig crond on to start automatically
5,
Basic Format:
* *** Command
Hour, day, month, and week commands
The 1st column indicates minute 1 ~ 59 per minuteOr/1 indicates
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)

30 21 ***/usr/local/etc/rc. d/lighttpd restart
The preceding example indicates restarting apache at every night.

Crond does not support accurate to seconds

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.