Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 want to create a cronjob at my Ubuntu server by adding/modifying a file in the /etc/cron.d folder, rather than using crontab -e as it's not too easy to automate.

I've managed to make a file looking like this:

* * * * * username command >> logfile

I can tell that the file is there, I've chmoded it to 777 but it still isn't executed or appears when I do crontab -l as root. What am I doing wrong?

share|improve this question
Forget about crontab -e and use crontab my_private_crontab_file or crontab -. – maaartinus Mar 6 '12 at 5:11
It won't appear on root's crontab -l. Please chmod the file to 0600 and chown it to root.root – Jodie C Mar 12 '12 at 1:59
up vote 1 down vote accepted

The file needs to be owned and writeable by root. Also make sure that your time-specification is correct - is * * * * * the real one?

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.