0

crontab -e opens up the editor selector. I choose 2 for nano. Edit the cron job. [Ctrl]+O to save. [Ctrl]+Z to exit. Then crontab -l to list and it tells me there are no cron jobs set for my user.

There is no /etc/cron.allow file and there is no /etc/cron.deny. My user is in the /etc/shadow.

I did a apt-get remove cron && ape-get update && apt-get install cron and it removed clamtk clamtk-gnome cron ubuntu-standard so I reinstalled them as well. Still no luck.

sudo crontab -e brings up an empty nano cron file with standard instructions for editing cron.

sudo crontab -l gives : no crontab for root

crontab -e brings up an empty nano cron file with standard instructions for editing cron.

cronatb -l gives : no crontab for user

Using Ubuntu 16.04

  • 1
    and you used "sudo" on all commands? – Rinzwind Sep 27 '16 at 17:48
  • yes I did use sudo . I even tried as root using sudo su. – bobZBy Sep 27 '16 at 17:52
  • Crontab -e and crontab -l show output from the user's crontab. If you used sudo with crontab -e, use sudo crontab -l to view and similarly and report back. – Ashhar Hasan Sep 27 '16 at 17:56
  • Perhaps there's something messed up in the mounting of your /tmp that's preventing the temporary crontab file from being written to the spool directory? Or /var is simply full? – steeldriver Sep 27 '16 at 19:22
0

I just figured it out. I usually use [Ctrl]+Z to exit nano and it works just fine for everything I usually use, like: sudo nano /etc/sources.list or sudo /etc/apache2/sites-available/mysite.com.conf.

However for some reason when setting a crontab you must exit with [Ctrl]+X or the job will not be saved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.