LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-07-2008, 09:09 AM   #1
rajan.prabhakar
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Rep: Reputation: 0
error when i type crontab -e and save


This is the error when i type crontab -e and save for a user in solaris 10

"/tmp/crontabzWai5I" 1 line, 16 characters
The editor indicates that an error occurred while you were
editing the crontab data - usually a minor typing error.

Edit again, to ensure crontab information is intact (y/n)?
('n' will discard edits.)
 
Old 10-07-2008, 09:14 AM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 585

Rep: Reputation: 58
Check if /tmp is not full or has proper rights.
 
Old 10-07-2008, 09:14 AM   #3
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 585

Rep: Reputation: 58
Sorry check also /var/spool or /var in general if its not full.
 
Old 10-07-2008, 09:28 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,937

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
Since you're talking for a Solaris box, you should set "EDITOR=vi" prior running crontab -e.
 
Old 10-07-2008, 09:31 AM   #5
rajan.prabhakar
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
I have set the EDITOR to vi also

and there is ample amount of space avilable in /var partiotion

the permission for /tmp is
drwxrwxrwt 50 root sys 19968 Oct 7 19:56 tmp
 
Old 10-07-2008, 09:44 AM   #6
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Rep: Reputation: 15
in that case make sure an individual record does not span 2 lines.
if it does remove the new line and try again. so it shows a $ or similar instead of the new line.
 
Old 10-07-2008, 09:57 AM   #7
rajan.prabhakar
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
im not able to do this(crontab -e) for any user even root

and there are no entries than span two lines
 
Old 10-07-2008, 10:30 AM   #8
Interflex
Member
 
Registered: Aug 2008
Posts: 52

Rep: Reputation: 15
does crontab -l work?

is there a newline at the end of the file?
 
Old 10-08-2008, 01:42 AM   #9
rajan.prabhakar
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
there is no blank line at the end
 
Old 10-08-2008, 02:21 AM   #10
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,937

Rep: Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330Reputation: 1330
Run
Code:
ps -ef|grep crontab
to see if there is no other crontab editing running and then (re)move the temporary file from /tmp. Set the EDITOR to vi and try again to edit crontab.
 
Old 10-08-2008, 03:06 AM   #11
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
At only 16 characters, it is pretty likely there is an error in the file. A minimal crontab entry would be:

Code:
* * * * * /x
which is 13 characters including the newline. Unless the script is located in the root and its file name is only 4 characters (eg. /abcd), there's an error.
 
Old 10-09-2008, 02:34 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Have you set custom commands in ~/.exrc or $EXINIT ?

A vi error due to a mistake in these commands can cause the problem you describe.

You can try a different editor to sort it out like this:
Code:
$ EDITOR=/usr/dt/bin/dtpad crontab -e
 
Old 10-10-2008, 04:41 AM   #13
rajan.prabhakar
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Not working either
 
Old 10-10-2008, 04:50 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Can you elaborate about it ?

What happens when you enter the command ?
What is the crontab content looking like ?
What error message do you get when saving the file and leaving the editor ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Dual Boot Vista Suse 10.2 error setting type of partition to type 82 jmp559 Linux - General 1 05-15-2008 06:40 PM
Crontab -e does not save kiley_rodgers Linux - General 7 01-13-2006 09:59 AM
Type into a PDF and save the changes? toastermaker Linux - Software 7 01-16-2005 05:15 PM
How to type in syntax to create a crontab with RH9 SoNewItHurts Linux - Newbie 5 02-20-2004 12:09 AM


All times are GMT -5. The time now is 07:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration