jeudi 23 mars 2017

How do i execute 5 PHP scripts randomly between 30-120 seconds?

I have a problem i'am dealing with for a couple of days. I want to execute 5 PHP scripts that are located in 1 map on my ubuntu server.

I would like to have these 5 scripts randomly execute with a 15-60 seconds interval. So i get a situation like:

Execute random script (1-5).php -> Wait 15-60 sec -> Execute random script (1-5).php -> wait 15-60 sec etc....

I tried looking for solutions and i know it can be done but i can't find the right command. Should i use a cronjob only or use a bash script?

Any help is appreciated!




Aucun commentaire:

Enregistrer un commentaire