Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 was learning and experimenting with crontab today.

The default editor was just too difficult for me to figure out which caused me to remove my crontab by running crontab -r.

Now, when I run crontab -e and input my new cron task, nothing happens. I suspect it's the crontab -r command I executed earlier.

Can anyone help, please?

share|improve this question
Next time please provide the cron job you try to run so that we can understand the problem better. – tiktak Mar 28 '12 at 15:31
up vote 1 down vote accepted

When you did crontab -e, nothing happens and it returned you normal prompt ?

if it gives you an empty space you should enter your variables like :

0 0 * * * /opt//newauditlog.ksh > /dev/null 2>&1

After you did that you can exit with :wq!

share|improve this answer
Thank you! That works – sisko Mar 28 '12 at 13:22

This sounds like a RTFM question to me ;-)

man crontab

The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified crontab will be installed automatically. If neither of the environment variables is defined, then the default editor /usr/bin/editor is used.

So the -e option should "automatically install the modified crontab"

Make sure there is a file matching your username and your jobs in /var/spool/cron/crontabs and check the content of /etc/cron.allow and /etc/cron.deny

Also, look that the cron daemon is running: ps aux | grep cron

share|improve this answer
non of those files (cron.allow nor cron.deny) nor any matching username file exits in /var/spool/cron/crontabs – sisko Mar 28 '12 at 12:31
Then this means the "crontab" utility is not doing its job. See my update – tiktak Mar 28 '12 at 15:28

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.