php queue, how to design scheduled tasks?
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
crontab
You can write one that always runs in the background
while(true){ // 业务处理代码 sleep($time) }
You can control time through $time.
Please describe the problem clearly. What application scenarios do you need to use resident processes?
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
crontab
You can write one that always runs in the background
You can control time through $time.
Please describe the problem clearly. What application scenarios do you need to use resident processes?