Results 1 to 6 of 6

Thread: Root's crontab being deleted on 12.04

  1. #1
    Join Date
    Apr 2009
    Beans
    99

    Exclamation Root's crontab being deleted on 12.04

    Hi there,

    It seems like my root's crontab file were being deleted.

    I edited it yesterday as:

    sudo crontab -e

    And add a line.

    This morning I noticed the command wasn't executed at all, so I open it again:

    sudo crontab -e

    For my surprise, the command was removed there were only the heading comments of the void crontab as it comes on a new install.

    I thought I could did something wrong, so I try it again. This time I first do:

    sudo su

    To be sure I was root. And then:

    crontab -e

    I add my line to the crontab file and save it. To be sure about that, I executed again:

    crontab -e

    And I found that the line I was added was actually there.

    Well, a couple of hours later I noticed that the command weren't executed neither, so I run again:

    crontab -e

    And my command was NOT there.

    So it is pretty clear that something is removing it. Now the question is WHAT?

    Any ideas?

    Bests,

  2. #2
    Join Date
    Apr 2009
    Beans
    99

    Re: Root's crontab being deleted on 12.04

    Hi,

    I am the only one who has experienced this problem? Should I fill a bug report or so?

    Bests,

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,329
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Root's crontab being deleted on 12.04

    Well it's pretty unlikely the line is being removed. The most likely guess is that it isn't being saved even though you think it is. A much less likely possibility is that somehow the system reverted to the prior version of the file.

    When you say you verified that the line was still there, did you examine /var/spool/cron/root directly after editing it? After you save the file use "sudo more /var/spool/cron/root" to verify that the file was actually changed.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Apr 2009
    Beans
    99

    Re: Root's crontab being deleted on 12.04

    Hi SeijiSensei.

    Yet, the line was there, and so the /var/spool/cron/root file *but* I have realized now that /var/spool is mounted on a ramdisk, as part of the optimizations I introduced when I moved from my former HDD to the SSD following these advices:

    http://apcmag.com/how-to-maximise-ss...with-linux.htm

    And so, everytime I shutdown my desktop computer all the crontabs in the spool are lost.

    Elementary... X-)

    The solution is pretty easy now that I have discovered the cause.

    Bests,

  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,329
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Root's crontab being deleted on 12.04

    I hope you're not running a mail server! You'd lose all your mailboxes and the mail queues if they are on volatile storage.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  6. #6
    Join Date
    Aug 2008
    Beans
    26

    Re: Root's crontab being deleted on 12.04

    I had the same problem - and the same cause..

    thanks for posting this - it was driving me mad!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •