Linux timed Tasks

Source: Internet
Author: User

Crontab per minute, hourly, daily, weekly, monthly, yearly

Execute */5 every five minutes * * * *

Executes 0 per hour * * * *

Executes 0 0 * * * per day

Weekly Execution 0 0 * 0

Monthly execution 0 0 1 * *

Annual Execution 0 0 1 1 *

Linux timed Execution URL link

There are two ways to do a scheduled task, but both fail
1.CRONTAB-E is written in a * * * * * */usr/bin/php Http://localhost/nh/index.php/Crontab/addLevel
But error: Could not open input file:http://localhost/nh/index.php/crontab/addlevel (firewall is off)
2,CRONTAB-E is written in a * * * * */usr/bin/php/home/wwwroot/default/nh/test.php but error: PHP warning:cannot Modify Header Informat Ion-headers already sent by (output started At/home/wwwroot/default/nh/test.php:2) in/home/wwwroot/default/nh/test.ph P on line 3
The second method test.php

<? PHP

Header ("Location:http://127.0.0.1/nh/index.php/crontab/addlevel");

?>

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.