Running a PHP program with Windows Schedule task

Source: Internet
Author: User

The scheduled Task (Schedule Task) is a program similar to cron on the Windows platform, and of course the functionality is much worse.

Manual operation is impractical because you need to run a PHP program every hour.

First in the CMD test, for example: C:/appserv/php5/php.exe "c:/appserv/www/temp2.php"

One thing to note is that if that PHP references another page, it needs to provide an absolute path, at least as far as my test results are concerned.

Set up Scheduled tasks, you can take advantage of the Add Schedule Task's wizard. Finally, you need to set the Until:time in the advanced settings to 1 minutes earlier than your start time.

Because I tested it on my laptop, I used a battery to remove the power management from the setting.

Specific reference:

Http://manual.b2evolution.net/Set_up_a_Windows_Scheduled_Task

http://sharpertutorials.com/windows-task-scheduler/

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.