Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Run CRONJOB every Second?

General questions about VestaCP
Locked
  • Print view
Advanced search
6 posts • Page 1 of 1
blackside
Posts: 4
Joined: Sat Jan 03, 2015 11:45 am

Run CRONJOB every Second?

Post by blackside » Mon Feb 29, 2016 11:04 pm

Is there any option / hack to run a Cronjob every second in VestaCP?

Thanks.
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Run CRONJOB every Second?

Post by imperio » Mon Feb 29, 2016 11:52 pm

Why do you need this ? o_O
this is possible only via bash script
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Run CRONJOB every Second?

Post by skurudo » Tue Mar 01, 2016 1:33 pm

Topic was before. I hope this help:
viewtopic.php?t=7411#p24051
Top

newtron
Posts: 22
Joined: Wed Jan 13, 2016 4:43 pm

Re: Run CRONJOB every Second?

Post by newtron » Wed Mar 02, 2016 6:07 pm

No need for bash.. lOl

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;
}
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.. )
Top

imperio
VestaCP Team
Posts: 7000
Joined: Sat Dec 01, 2012 12:37 pm
Contact:
Contact imperio
Website

Re: Run CRONJOB every Second?

Post by imperio » Wed Mar 02, 2016 6:11 pm

We cant help you with that. This does not apply to VestaCP
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Run CRONJOB every Second?

Post by skurudo » Tue Jun 14, 2016 8:07 am

Closed.
viewtopic.php?t=7411#p24051
Top


Locked
  • Print view

6 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password