cPanel & WHM Version 98 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Allow cron job customizations at the 'second' interval.

David Levey shared this idea 4 years ago
Not Planned

As a server administrator I would like to be able to customize cron jobs beyond the one minute interval. Being able to configure jobs by the second would be beneficial.

Best Answer
photo

Thanks David and John for the request! Currently, as you said, the lowest increment allowed in cron is 60 seconds. The lowest increment cron allows is 60 seconds. To provide this feature we would need to write our own cron implementation, which isn't something we are likely to do at this point.


If a user needs to execute a job every N seconds, where N < 60, the best way to accomplish that would be to either run a daemon that checks every N seconds, or run a script every minute that would execute, wait N seconds, performs its actions and exit. I'm going to mark this as not-planned, but leave this request otherwise as is.

Replies (3)

photo
1

Thank you David for submitting this request on behalf of ticket opened at your helpdesk.


To make it clearer :

You have provided a solution which fit the immediate needs indeed :

http://www.askbjoernhansen.com/2007/11/19/space_out_cronjobs.html

(This is already fantastic, as of many of the sysadmins I asked, they were not able to provide a solution (and this should not be..), and your team is always on top, and finding the single article of the web which relates to this possible tweak...


Thanks to notepad+, i have been able to modify 500 files related to cron from /var/spool/cron/ in no time...


It would ne nice that on top of cron service delivered by OS, cpanel would introduce such feature in WHM panel, which would spread execution of cron over the 30-40 first seconds within a minute...

photo
1

Thanks David and John for the request! Currently, as you said, the lowest increment allowed in cron is 60 seconds. The lowest increment cron allows is 60 seconds. To provide this feature we would need to write our own cron implementation, which isn't something we are likely to do at this point.


If a user needs to execute a job every N seconds, where N < 60, the best way to accomplish that would be to either run a daemon that checks every N seconds, or run a script every minute that would execute, wait N seconds, performs its actions and exit. I'm going to mark this as not-planned, but leave this request otherwise as is.

photo
1

This is not a thing at user level we need, we talk of server charge repartition...

Leave a Comment
 
Attach a file