Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Let's say that I have the following cron jobs:

* * * * * /path/to/taskB
* * * * * /path/to/taskC
* * * * * /path/to/taskA

Is there any guarantee to the order in which they will be run?

I've seen some people say they run in alphabetical order and others say they run in the order they are entered and yet others say they run in parallel.

I'm asking for 10.04, but if it changes in others, I'd like to know that too.

share|improve this question
up vote 4 down vote accepted

The order for Ubuntu is top-down but in parallel.

Meaning, for your example:

  * * * * * /path/to/taskB
  * * * * * /path/to/taskC
  * * * * * /path/to/taskA

  1. taskB starts first,
  2. then taskC without waiting for taskB to complete,
  3. then taskA without waiting for taskC or taskB to complete

Ubuntu inherits this order from Debian. But in general this behavior may vary by Linux distribution/version and cron implementation. You should not depend on it to be the same. For example, in FreeBSD, the order is bottom-up!

If the scripts depend on each other, best to call them in sequence, one from the other, or from a "master" wrapper script, which is the only one cron actually executes.

share|improve this answer
The parallel task order is valid for Ubuntu. – Thomas Ward May 29 '12 at 12:55

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.