php queue, how to design scheduled tasks?
PHP中文网2017-06-23 09:13:37
1. Use the open source MQ message queue software (lightweight recommended)
2. Use MySQL+crontab to implement it yourself
3. The redis list can also be implemented
为情所困2017-06-23 09:13:37
You can write one that always runs in the background
while(true){
// 业务处理代码
sleep($time)
}
You can control time through $time.
伊谢尔伦2017-06-23 09:13:37
Please describe the problem clearly. What application scenarios do you need to use resident processes?