Benches Uncategorized

10

crontab -e no longer working

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I've been updating my crontab every few days, but now crontab -e fails with:

crontab: installing new crontab
crontab: tmp/tmp.4616: No such file or directory
crontab: edits left in /tmp/crontab.jlXWcDL7vH

The edits file exists but I can find no other cause. Clearing the edits files, rebooting, etc does not solve the problem. Any ideas what's causing this and how to fix it? Thanks

10 replies

Sign in or join Beachball Help to reply.

  1. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    have you changed your EDITOR environment variable? What is it set to?

    (What do you get for "echo $EDITOR" ?)

    You can edit this file with

    sudo vim /etc/crontab

    but you are better off using /etc/periodic/* scripts.

  2. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    nothing in the environment has changed. EDITOR is set to 'vim'.

  3. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    SOA,

    Make yourself root and create a zero byte file call it testcron. You can just vi testcron then :wq! to save it. Type crontab -u user testcron (where user is your account name). Next delete the crontab with crontab -u user -r. Now exit the root account and type crontab -e to see if you can now edit your crontab.

  4. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    it still reports tmp/tmp.XXX doesn't exist

  5. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    SOA,

    Try this:

    crontab -l > testcron
    vi testcron (make whatever changes you like)
    crontab testcron

    now try crontab -e

    if it still doesn't work go to /var/cron/tabs and delete what's there.

  6. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    basically, that's what I did. my crontabs are stored in /usr/lib/cron/tabs. with no crontab for my uid, setting one with an existing file yields this:

    macdaddy:~ stewart$ crontab testcron
    crontab: tmp/tmp.12574: No such file or directory

    it does this even as root.

    -stewart

  7. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi,

    Is vim configured to keep backup copies of the files you edit? I remember this causing trouble when using vim as my crontab editor. Disabling that feature fixed my problem.

    --
    Cole

  8. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    2 words that solved this problem for me:
    LaunchD & Lingon

  9. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    how about checking if your tmp directory hasnt dissapeared, disk got full or the like? Sometimes the most simple things can confuse experts...

  10. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    SOA wrote:
    I've been updating my crontab every few days, but now crontab -e fails with:

    crontab: installing new crontab
    crontab: tmp/tmp.4616: No such file or directory
    crontab: edits left in /tmp/crontab.jlXWcDL7vH

    The edits file exists but I can find no other cause. Clearing the edits files, rebooting, etc does not solve the problem. Any ideas what's causing this and how to fix it? Thanks

    I'm not sure which version of Leopard you saw this problem on but it should be fixed in the GM release.

    Ben