scheduling tasks to execute PHP files related issues

Source: Internet
Author: User
scheduling tasks to execute PHP file issues
Wrote a a.php file,
And wrote a bat, the content is:
C:\wamp\bin\php\php5.3.8\php.exe-f E:\photoselect\work\a.php

Execute bat regularly in Task Scheduler, set 5 minutes to execute once

But often 5 minutes is not finished, will be 5 minutes later ran a bat, this will be wrong,
(In the scheduled task has been set to the time is not run to complete, not a new instance), but seemingly invalid, do not know if this is not only for EXE

Thank you for your help.

------Solution--------------------
5 minutes to deal with, can only find ways to improve the efficiency of a.php, check the bottleneck where, consider multithreading.


In addition to not complete the new instance, is for bat, PHP you need to implement the duplicate process detection.
------Solution--------------------
Modify the a.php file when running to determine whether there is still running, is the word to exit directly. No words. Run end Destroy flag
  • Related Article

    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.