Can't edit crontab

archlinux, cron

Solution

This message is normal because you still do not have any crontab for that user:

no crontab for foo - using an empty one

Regarding the following:

nano / vim: No such file or directory

crontab: "nano" exited with status 1

It is happening because you are not defining the editor properly. To do so, you have to specify the full path of the binary:

export EDITOR=/usr/bin/nano

or

export EDITOR=/usr/bin/vi

Problem

I'm trying to edit my crontab, but I just can't open it! So with my user foo, I just type: ``` crontab -e ``` Then I got: ``` no crontab for foo - using an empty one nano: No such file or directory crontab: "nano" exited with status 1 ``` So I tried first: ``` export EDITOR=nano ``` I retried and I got exactly the same output. I also tried to set my editor to Vim with: ``` export EDITOR=vim no crontab for foo - using an empty one vim: No such file or directory crontab: "vim" exited with status 1 ``` But I keep getting the same output again and again. How can I open my crontab and then edit it?

Original source