[CentOS] the at command
silvertip257 at gmail.com
Tue Jan 22 14:39:04 UTC 2013
On Mon, Jan 21, 2013 at 4:46 PM, Jerry Geis <geisj at pagestation.com> wrote:
> > @Jerry:
> > You might explain what it is you are attempting to do or why it is you
> > to schedule a job down to the second.
> I am looking for a way to "sync" up running a command on 10 boxes at the
> same time.
> So I thought - hey in my program "I can send a command out that I want
> to run - this command is also another program of mine, get the current
> time, add 5 seconds to it, send this time HH:MM:SS
> to all 10 boxes and "schedule" an "at" command to run at that time.
> So all 10 boxes are running NTP and I thought it would be fine then if
> one box got it slightly faster
> than the last it would not matter as the "at" command would schedule the
> command to run
> all at the same time.
You're telling us how you want it to work, but not _what_ you are
attempting to schedule at an interval of a few seconds.
> So what mechanizim exists to run command down to the second?
Since you have the hosts' time relatively accurate via NTP this "cron/at
limitation" (if we dare call it that) should not be a problem.
A cronjob scheduled at a certain time (to the minute) runs within a second
or two. Of course load needs factored in, but this is unavoidable even
_if_ you could schedule down to the second with cron/at.
> I'd rather not wait an entire 59 seconds to run the command.
We could argue this comment.
If you want something done immediately, run it by hand?!
John Doe's advice of an infinite loop or a 'clustered ssh' is probably your
> CentOS mailing list
> CentOS at centos.org
// SilverTip257 //
More information about the CentOS