Re: the at command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Jan 21, 2013 at 4:46 PM, Jerry Geis <geisj@xxxxxxxxxxxxxxx> wrote:

> > @Jerry:
> > You might explain what it is you are attempting to do or why it is you
> need
> > 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
best bet.


>
> Thanks,
>
> Jerry
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>

-- 
---~~.~~---
Mike
//  SilverTip257  //
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux