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

I have this line in my crontab file

*/1 * * * * espeak 'foo' && espeak 'bar'

But only half of it, first command gets executed every minute.

While when I write this in the terminal it works like a charm.

Is there a different way to execute 2 commands in the same line in the crontab file ?

share|improve this question
First, use the full path to espeak in crontab. Second use ; rather then &&. command1; command2 – bodhi.zazen Mar 7 '13 at 19:29

&& is interpreted by bash as one of the operators that separate pipelines in a command line. If you call those commands from bash both should run:

*/1 * * * * bash -c 'espeak "foo" && espeak "bar"'
share|improve this answer

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.