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 did something as simple as this:

crontab -e 

* * * * * touch /home/alexis/hi.txt

crontab: installing new crontab

but it doesn't work at all; not mentioning more complicated scripts. any idea what went wrong?

share|improve this question
Did you give permission for execution? Have you tried the script before adding it to crontab? – maniat1k Dec 18 '11 at 18:45
Also try using the full path, /bin/touch rather then touch – bodhi.zazen Dec 18 '11 at 18:47

The normal user-PATH isn't used, when running crontab.

Either you use the full path to touch (/usr/bin/touch), or you set the PATH in the crontab file itself, if you need it multiple times.

share|improve this answer

/var/log/syslog contains a detailed log of cron activity. Since your cron is set to run every minute, the log should contain plenty of entries indicating exactly what went wrong. Checking that the PATH is set is one possibility. Have a look at the file I mention and if you have trouble interpreting the error message, please edit your question and add the entire line that contains the error. Someone is bound to be able to help you with this.

share|improve this answer

Check that you have a cron daemon running:

initctl list | grep cron
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.