crontab -e doesn't behave as it should.

Asked by Ramy Al-AShram

I open a window/terminal in Ubuntu 10.10, and type in the command crontab -e, and it doesn't behave as it should. I think what has happened is that the command crontab -e has changed editors for me from "nano" to "vim". How could I force it back to "nano"?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cron Edit question
Assignee:
No assignee Edit question
Solved by:
Ramy Al-AShram
Solved:
Last query:
Last reply:
Revision history for this message
Ian Clifton (gordaen) said :
#1

To edit crontab from the command line, simply run "crontab -e"

This file is used to determine what commands to run automatically and when.

The first number is the minute (0-59)
The second number is the hour (0-23)
The third number is day of the month (1-31)
The fourth number is the month (1-12)
The fifth number is the day of the week (0-6, 0=Sunday)

Here is a mini-sample:
_____
<email address hidden>"
# m h dom mon dow command
5 3 */2 * * bash /home/me/backup/backup.sh
_____

MAILTO allows you to have cron messages delivered to you via email (otherwise they are typically delivered to your user locally).
Anything starting with "#" is a comment, so that second line is just for easy reference
The third line says, "5 minutes after the third hour of every other day of every month regardless of day of week run backup.sh"
In other words, every other day at 3:05am run backup.sh

Revision history for this message
williamts99 (williamts99) said :
#2

Hello,
https://help.ubuntu.com/community/CronHowto should fill you in on all of the details.

Best Regards,
Williamts99

Revision history for this message
Ramy Al-AShram (ramyashram) said :
#3

dear all

i m really thank you both

Best Regards