Answer the question
In order to leave comments, you need to log in
How to run a php script every minute?
Yes, I know what cron is, but I need the user to launch a script when they click a button on the site, which will run every minute.
Is it possible somehow to add/remove commands to cron via php?
Or tell me other options.
Answer the question
In order to leave comments, you need to log in
It is better to let the necessary info be saved when the user presses the button in the database or somewhere else, and the only script in cron pulls the info and performs the necessary actions.
Is it possible somehow to add/remove commands to cron via php?
It's called "agent". User activity triggers server scripts.
If there are users on the site every minute, that's good. You hang an event for calling your script on the transition through the site, which checks whether it's time to start the script or not.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question