Re: the at command

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



>
> @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.
>
>
>>  >Thanks,
>> >
>> >Jerry
>>
>> I think you're limited to 1 minute granularity.  But if you want to run
>> something
>
>
> Yes, both cron and at can be scheduled down to the minute (but no further).
> And for most jobs/situations, running every minute or every couple of
> minutes is suitable.
>
>
>> at a specific second (ie: 13 seconds after the minute), you could modify
>> the script to sleep for 13 seconds before running and run it on the minute,
>> or prepend a sleep in the cron entry itself:
>>
>> * * * * * sleep 13; touch /tmp/foo
>>
>
> @Joseph:
> Nifty trick/hack! ;)
>
>

I think you might need to be careful with trying tricks to get your
sub minute granularity; between things like potentially running inside
a VM which seems to be able to loose ticks under high load and  thus
needs ntp to keep it close to true time, and ntp fudging things
forwards or backwards to get back where things should be, I think you
could find yourself in problems.

Not that this isn't a reasonable suggestion to attempt, just that if
you really very specifically, with lots of bad consequence if you
don't get it right have to run at a particular second, I think there
are some pitfalls to look for.



-- 
Even the Magic 8 ball has an opinion on email clients: Outlook not so good.
_______________________________________________
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