Home  >  Q&A  >  body text

PHP uses sleep to implement scheduled tasks. How to quickly return information prompts after sleep?

PHP uses sleep to implement scheduled tasks. How to quickly return information prompts after sleep


##sleep(3);


How to return information quickly without a three-second delay?


There seems to be a bit of a conflict, but I don’t know how it will end.

小破孩小破孩1910 days ago1462

reply all(3)I'll reply

  • 就手

    就手2020-05-22 18:48:51

    Learn about php redis multi-process ring queue

    reply
    0
  • 殘留の回憶

    殘留の回憶2019-07-04 09:58:44

    Using sleep to make a timer is a scam. You can operate it from the server, or if it doesn't work, you can also use js to adjust the php program.

    reply
    0
  • 小破孩

    I have given up using sleep and have written scheduled tasks on the server.

    小破孩 · 2019-07-04 10:00:17
  • Cancelreply