LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > LinuxShare
User Name
Password

Notices


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
442

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 804 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 08:34 AM.

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