Running a PHP script every 5 minutes and avoiding race conditions

后端 未结 5 1280
无人及你
无人及你 2021-01-12 12:13

I have a php script that needs to run once every 5 minutes. Currently I\'m using a cron job to run it (and it works great) but my host only allows a minimum time of 15 minut

5条回答
  •  囚心锁ツ
    2021-01-12 12:34

    You can use The Fat Controller to run a script at 5 minute intervals. Unlike CRON it guarantees the interval from when one instance of the script ends to when another one is started.

提交回复
热议问题