Run CRONJOB every Second?
Run CRONJOB every Second?
Is there any option / hack to run a Cronjob every second in VestaCP?
Thanks.
Thanks.
Re: Run CRONJOB every Second?
Why do you need this ? o_O
this is possible only via bash script
this is possible only via bash script
Re: Run CRONJOB every Second?
Topic was before. I hope this help:
viewtopic.php?t=7411#p24051
viewtopic.php?t=7411#p24051
Re: Run CRONJOB every Second?
No need for bash.. lOl
Here's my script on PHP:
Its IMPOSIBLE to run a script every second (for that is better to daemonize an bash script... or python alternative, yo have SQL modules for python and its easy to script).
My scripts repeats the code every 4,8 seconds (time script is executed) and multiplies by 11 (52,8sec..., many times the script needs more than 3secs to finalize) 11 executions with a 1min CronJob..... and yeah... Prehistoric use of GOTO!! (Ohh... those days with my MSX.. )
Here's my script on PHP:
Code: Select all
$c= 0;
a:
""""" YOUR SCRIPT HERE """""
$c++;
if ($c > 11) {
exit;
} else {
usleep(4800000); //4.8 segundos
goto a;
}
My scripts repeats the code every 4,8 seconds (time script is executed) and multiplies by 11 (52,8sec..., many times the script needs more than 3secs to finalize) 11 executions with a 1min CronJob..... and yeah... Prehistoric use of GOTO!! (Ohh... those days with my MSX.. )
Re: Run CRONJOB every Second?
We cant help you with that. This does not apply to VestaCP