Pending posting to PHP?
I must say that the desire to make some services ex. posting no. Purely for yourself.
How do you make PHP a delayed posting? Here is Crowns, it is called, for example, once per minute. That's how it is called - and so fast.
How to make a posting on schedule, but without the Crown (or with him, but not to produce a cron task for every desired date)? Here in VK the delayed posting. I went in, wrote that it is necessary, choose a date and time. Everything on the specified time something is uploaded.
Maybe it's all in PHP?
3 answers
In php like any other language is possible almost everything. Your task is certainly.
Solved simply enough. You keep a list of what is necessary to post and time of post(in database, in file, does not matter). And the cron once a minute a script is run which checks for tasks. If the time has come, then post and delete the task if no task then just falls asleep again.
You can't kill PHP script and spin in a loop until the desired time. If it is to answer your question.
If solve your problem, then - cron. Didn't you just read what is CZK, apparently.
1. Doing an infinite loop in a PHP application and run in daemon mode.
2. Interview task pool and "fall asleep" on time to the next task.
3. Wake up - do.
4. GOTO 2
Find more questions by tags PHP
https://packagist.org/packages/peppeocchi/php-cron...
code.tutsplus.com/ru/tutorials/managing-cron-jobs-...
www.phpjobscheduler.co.uk
www.phpclasses.org/package/4140-PHP-Database-drive... - Donny71 commented on July 8th 19 at 11:37