Latest LQ Deal: Linux Power User Bundle
Go Back > Blogs > LinuxShare
User Name


Rate this Entry

Crontab not opening the file to edit

Posted 04-04-2012 at 01:27 PM by LinuxShare

I had previously ran into an issue where the crontab did not open the file to edit due an issue with the default editor path. This can be checked by just trying to open the vi editor from the prompt. If you run into issues in opening a file using 'vi', then crontab -e will not work.

Here is a different case, where 'crontab -e' throws a number back to the screen and does nothing. Example:

crontab -e

This number is differing for each user id for which the cron file was tried to edit.

While crontab -e may is not working, crontab -l will list out the contents of the cron file.

A suspected reason for this is incorrect terminal settings.

A very simple workaround in this case is as follows:

1. crontab -l > temp.cron (list the contents of the cron list to a temporary file)

2. vi temp.cron (edit the file to include the new changes)

3. crontab temp.cron (load the contents of the edited file back to the cronlist)
Posted in Uncategorized
Views 592 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 04:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration