Linux / Unix – Crontab: no crontab for user

Linux / Unix – Crontab: no crontab for user ?

I am trying to set cronjob on a Unix systems by running the crontab -e command.

But, I’m getting the following error:

How do I fix this issue on a Linux or Unix-like systems?

You need to set correct environment variable called EDITOR. It appers that either vi is not installed or /usr/bin/vi is a symbolic link to vim editor. To edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables, enter:

$ crontab -e

But, if EDITOR  is not set, so you will see an error as follows:

export EDITOR=vim

Finally, try to edit or set new cron jobs, enter:

crontab -e

I recommend that you edit your shell ~/.bashrc file and append the following line:

export EDITOR=vim



Leave a Reply

Your email address will not be published.

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

This site uses Akismet to reduce spam. Learn how your comment data is processed.