The default crontab editor is nano on some systems. This is a pain. You can change this by setting
the EDITOR environment variable.
In Bash file
vi .bash_profile
enter the below line:
export EDITOR=vi
Adding the entry to your ~/.bash_profile file won't take affect until it is re-read, which will happen
when you log in again. You can re-read the file immediately by doing this:
. ~/.bash_profile