"PHP" Window System set up scheduled tasks, timed to call an interface

Source: Internet
Author: User

1 using the browser to access the interface address (new Corn.bat file, the contents are as follows)

 

"C:\Program files\internet Explorer\iexplore.exe" http://www.baidu.com

  

The front is the path of the browser, need to quote, followed by the interface address to be visited, without quotation marks

2. Because it is a PHP project, execute the interface by invoking the PHP file (also ready for the bat file and the interface file)

The bat content is as follows:

    

PHP File Content Example:

<?php//1, execute function//2, access to a ur; Direct  file_get_contents ("URL"); >

2. Open Control Panel \ All Control Panel items \ Administrative Tools \ Task Scheduler

    

Fill in the Task name

    

Set Execution time

    

    

Select Startup program

    

    

Finish saving

    

Create a successful test run and view the results

    

Description: A shopping mall project needs to automatically receive orders for 7 days of receipt, so think of scheduled tasks. But after writing the interface, do not know what to do. Small white dare not abuse sleep, so found a plan task this thing.

In addition, about the automatic receipt of the implementation method, the use of the call interface time and delivery time difference, in fact, the better way is to pick up a courier API, and then according to the status of the courier to determine the time.

Finally, if there is a better way to achieve, hope to enlighten! Thank you

"PHP" Window System set up scheduled tasks, timed to call an interface

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.