Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for some Linux command which may launch another command at a specific time.

I know about the at command, but it gives me only minutes precision, and I need seconds precision. Is there an option with at command that I'm not aware of? Or is there any other command I should use?

Any orientation will be useful.

share|improve this question
Why? If a scheduler checked every second then it would eat up tons of processor. Why isn't minute precision good enough? – tjameson Jun 25 '11 at 5:03
You'll have to suffer with a little lack of precision - my results to time sleep 5 give me an extra .003 seconds. Try that command on your machine to see how accurate it will be. – new123456 Jun 25 '11 at 16:52
@tjameson , because I need to schedule something for 5 seconds or so, and the at command doesn't works for me. I wasn't going for the sleep command, but I guess I'll have to do with it. Thanks – Javier Novoa C. Jun 25 '11 at 22:21
up vote 7 down vote accepted

Use cron to run a script that calls the sleep command for the sub-miniute precision bit of it? So

sleep 10 ; 

should run 10 seconds after the command is called.

share|improve this answer
Do you know anything about its precision? Or the precision of at in executing something at exactly xx:xx:00:000? If the user requires this kind of precision, it's conceivable that at and sleep won't cut it. – Daniel Beck Jun 25 '11 at 9:36
sleep on ubuntu and as such debian accepts floating point values. "Unlike most implemenatations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number." However, if he needs smaller than whatever precision float supports... i have no clue – Journeyman Geek Jun 25 '11 at 9:41
I meant more along the lines of whether his script actually will start exactly at :10 when he specifies sleep 10, or maybe more like :11 or :12... – Daniel Beck Jun 25 '11 at 10:20
no idea, actually. i've mostly seen wait used as a 'lets give things a while to settle down' way, rather than as a precision timing instrument. – Journeyman Geek Jun 25 '11 at 10:24
Bog standard linux is not a real time system and offers no absolute timing guarantees. Get it heavily loaded and thrashing and things can become very delayed, indeed. // too much experience with systems that have nearly enough memory – dmckee Jun 25 '11 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.