T
T
TANK_IST2014-10-16 19:52:07
PHP
TANK_IST, 2014-10-16 19:52:07

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

3 answer(s)
I
Ivan, 2014-10-16
@TANK_IST

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.

A
Alexander Taratin, 2014-10-16
@Taraflex

Is it possible somehow to add/remove commands to cron via php?

www.php.su/functions/?exec

A
Alexander Borisovich, 2014-10-17
@Alexufo

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 question

Ask a Question

731 491 924 answers to any question