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 Web Server
  • Search

cronjob at specific time

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Locked
  • Print view
Advanced search
4 posts • Page 1 of 1
webdotapp
Posts: 33
Joined: Thu Jan 29, 2015 2:04 pm

cronjob at specific time

Post by webdotapp » Thu Mar 26, 2015 7:42 am

Hello,

I am trying to setup a cronjob which would run every minute at specific time for example 09:00:00, 09:01:00 and i am setting the same while watching clock so it can sync with correct time and can be run at 00 seconds every minute. But it only runs at 01 second of every minute for example 09:00:01, 09:01:01. How can i achieve the same using vesta control panel. Please suggest, thanks
Top

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

Re: cronjob at specific time

Post by skurudo » Fri Mar 27, 2015 11:37 am

I think something like this:

Code: Select all

*/1 9-10 * * *  /path/to/script
every minute
in period 9-10
Top

webdotapp
Posts: 33
Joined: Thu Jan 29, 2015 2:04 pm

Re: cronjob at specific time

Post by webdotapp » Fri Mar 27, 2015 12:15 pm

Thanks for your reply, but scripts run 1st second of every minute instead of 0th second of min. That was my question about.
I want it should run every min but at 00 second on every minute not 01 second of every minute. I hope this makes sense to you.

skurudo wrote:I think something like this:

Code: Select all

*/1 9-10 * * *  /path/to/script
every minute
in period 9-10
Top

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

Re: cronjob at specific time

Post by skurudo » Fri Mar 27, 2015 12:55 pm

Cron will make this fail with seconds. It's how it work. There is ways to accomplish, what you want - demon script, service script, mixed script/db and command at. I recommend use at, it's simpler.

There is guide for you. Hope it will help.
http://linuxaria.com/howto/manage-plann ... at?lang=en

PS: Can you tell, where you need such accuracy?
Top


Locked
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • 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