Results 1 to 5 of 5

Thread: Can't create crontab

  1. #1
    Join Date
    Dec 2004
    Beans
    37

    Can't create crontab

    Hi guys,
    A couple days ago I noticed cron stopped working and now I can't create a new file using crontab -e. When I hit crontab -e I get the editor but after saving nothing comes up under crontab -l and the file is blank when I reopen it. I don't have a cron.allow or a cron.deny.

    Rohan

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Can't create crontab

    Very odd!

    Which of the choice of three options for editing the text did you choose? If nano, which is the preferred application, are you sure you used the Ctrl+X to exit and then chose y to save the file?

  3. #3
    Join Date
    Dec 2004
    Beans
    37

    Re: Can't create crontab

    Quote Originally Posted by ajgreeny View Post
    Very odd!

    Which of the choice of three options for editing the text did you choose? If nano, which is the preferred application, are you sure you used the Ctrl+X to exit and then chose y to save the file?
    Ok... that is the strangest thing. I usually write out in nano first with "Ctrl-O" then exit with "Ctrl-X" it saves my crontab if I hit "Ctrl-X" then Y. Maybe Ctrl-O is writing to the wrong temp file.

    I think it works now though. So thanks!

  4. #4
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Can't create crontab

    It does not matter whether you do things with nano as I did, or the way you did, both should end up with a crontab file just the same. It is no different to using gedit to write a file, closing gedit and getting the option to save the file, or saving the file and then closing it; both end in the same file being saved.

    Whatever it was, I am glad you have it sorted now.

  5. #5
    Join Date
    Mar 2008
    Location
    England
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can't create crontab

    What happens if you run:

    Code:
    crontab -l > file
    Edit the file, and the run:
    Code:
    crontab file
    I usually do this instead of crontab -e, so that I have a copy of my crontab somewhere, in case I need to copy any commands or whatever.
    My Website. Computing resources, photos, articles etc.

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
  •