LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-15-2003, 03:58 PM   #1
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Rep: Reputation: 30
crontab doesn't let me to edit


i go to edit my crontab as root

crontab -e

stick in a new line and then try to exit with

:wq

like i usually would. but it always exits with some messgae about crontab was not edited. i go back into edit mode and it's true, my addition was not kept. can anyone help me. i go in as root and i haven't run across anything that would tell me why it wouldn't work.
 
Old 09-15-2003, 04:09 PM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
can you tell us the error msg maybe?
 
Old 09-15-2003, 04:13 PM   #3
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
crontab: no changes made to crontab

that's all it says
 
Old 09-15-2003, 10:23 PM   #4
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
type :w instead of :wq and tell me if you get an error (and the error msg if any)
 
Old 09-16-2003, 07:57 AM   #5
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
type just :w i get this in return.

"crontab.18950" 3L, 137C written

of cource i'm still in edit mode, so i type :q or :wq to get out and i still get the

"crontab: no changes made to crontab"

error. if i go back in to check to see, my addition is gone.
 
Old 09-16-2003, 10:19 AM   #6
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
problem is still here. the :w acts like it writes. but when i exit :q the edit doesn't take. Help would be appreicated
 
Old 09-16-2003, 11:17 AM   #7
vanquisher
Member
 
Registered: Aug 2003
Location: Hyderabad, India
Posts: 126

Rep: Reputation: 15
This may sound stupid, but did you try using any other editor?
$EDITOR=emacs/any editor crontab -e
 
Old 09-16-2003, 12:15 PM   #8
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
no i never used any other editor. just the "crontab -e" command itself. i could try it though. never used emacs so it might be a little difficult
 
Old 09-16-2003, 12:37 PM   #9
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
i'm not sure the other editor choice will work. "vi crontab -e" just gives a bunch or ascii char or something. crontab -e lets you move around like your in vi, but like i said it won't store the changes. the permissions on the /usr/bin/crontab (which i think is the location, since you can type "crontab -e anywhere") are same on the server that doesn't work as the server that does let me edit upon ll:

-rwsr-xr-x (permissions on the server that does and does not let me edit)

so we are still not knowing why i doesn't work


Last edited by wedgeworth; 09-16-2003 at 12:48 PM.
 
Old 09-17-2003, 12:14 PM   #10
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
vanquisher- turns out i think you were right. i think it's an editor problem not crontab itself or some kinda of priviledges problem. now i'll i need to do is reassign the editor to emacs. not real sure how to. i think it's something like this. if someone knows the exact syntax i'd appreicate. i've been looking a little bit but i haven't quite figured out the exact way to resign the editor yet.


> $EDITOR=/usr/bin/emacs crontab -e

or

> $EDITOR=/usr/bin/emacs

this did NOT work

> setenv EDITOR /usr/bin/pico
 
Old 09-17-2003, 12:15 PM   #11
wedgeworth
Member
 
Registered: Aug 2003
Posts: 234

Original Poster
Rep: Reputation: 30
vanquisher- turns out i think you were right. i think it's an editor problem not crontab itself or some kinda of priviledges problem. now i'll i need to do is reassign the editor to emacs. not real sure how to. i think it's something like this. if someone knows the exact syntax i'd appreicate. i've been looking a little bit but i haven't quite figured out the exact way to resign the editor yet.

maybe

> $EDITOR=/usr/bin/emacs crontab -e

or

> $EDITOR=/usr/bin/emacs

this did NOT work. didn't recognize the setenv command

> setenv EDITOR /usr/bin/pico
 
Old 12-13-2018, 04:41 PM   #12
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 492

Rep: Reputation: 45
This seems to be your issue, from ":h crontab":
Code:
							*crontab*
	One situation where [backupcopy's] "no" and "auto" will cause problems: A program
	that opens a file, invokes Vim to edit that file, and then tests if
	the open file was changed (through the file descriptor) will check the
	backup file instead of the newly created file.  "crontab -e" is an
	example.
 
Old 12-14-2018, 06:58 AM   #13
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by Geremia View Post
This seems to be your issue, from ":h crontab":
Code:
							*crontab*
	One situation where [backupcopy's] "no" and "auto" will cause problems: A program
	that opens a file, invokes Vim to edit that file, and then tests if
	the open file was changed (through the file descriptor) will check the
	backup file instead of the newly created file.  "crontab -e" is an
	example.
Probably; but after this thread being closed for FIFTEEN YEARS, I think the OP has figured it out by now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crontab reynacho_au Linux - Software 6 12-28-2004 03:09 AM
new to crontab desbyleo Solaris / OpenSolaris 15 12-16-2004 03:04 AM
How to use crontab ? Dakkar Linux - Newbie 2 01-22-2004 10:49 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
crontab help davsingl67 Linux - General 5 12-13-2002 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:12 PM.

Main Menu
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