mercredi 30 janvier 2019

What to use for running a php script for multiple users?

I got some code in php script (example.php). This script runs about 30-60 seconds and does some actions for one user.

Example.php runs atm only for 1 given user, what is the best way for looping over my users table and running this script for each one?

The script gets called now every ~5 minutes, this should stay the same expect it should be started for each user.

I am running PHP7.2 on my webserver and i tried it already with cronjobs. This works but only for the one hard-coded user. If I would put the loop for all users into this one script the running time would be to enormous. I tried to install pthreads on plesk but this also is a bit complicated.

As said it works for one user already but I dont know whats the best way to let it run for all users.




Aucun commentaire:

Enregistrer un commentaire