Php timer-scheduled task sleep is not executed after the page is refreshed

Source: Internet
Author: User
It is also a wonderful demand for customers. we need to create a scheduled task in php and execute it in N days. the method I found on the internet is to use the while loop, which uses sleep () control the task start time, but the problem is that the page cannot jump before the start time. if I write the jump to sleep, sleep is not executed. In fact, the biggest headache is that when sleep is executed, the customer cannot do anything else, and the customer needs a long scheduled time, almost four days, so I would like to ask if there is any other way for the php timer sleepphp

It is also a wonderful demand for customers. we need to create a scheduled task in php and execute it in N days. the method I found on the internet is to use the while loop, which uses sleep () control the task start time, but the problem is that the page cannot jump before the start time. if I write the jump to sleep (), the sleep will not be executed.
In fact, the biggest headache is that the customer cannot do other things during sleep execution, and the customer needs a long scheduled time, which is about four days. Therefore, I would like to ask if there is any other way.

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.