Cron jobs and random times, within given hours

后端 未结 12 2288
甜味超标
甜味超标 2020-11-27 11:02

I need the ability to run a PHP script 20 times a day at completely random times. I also want it to run only between 9am - 11pm.

I\'m familiar with creating cron job

12条回答
  •  [愿得一人]
    2020-11-27 11:16

    My first thought would be to create one cron job launching 20 randomly scheduled at jobs. The at utility (http://unixhelp.ed.ac.uk/CGI/man-cgi?at) is used for executing commands at specified time.

提交回复
热议问题