LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   error when i type crontab -e and save (https://www.linuxquestions.org/questions/linux-server-73/error-when-i-type-crontab-e-and-save-674813/)

rajan.prabhakar 10-07-2008 09:09 AM

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.)

robertjinx 10-07-2008 09:14 AM

Check if /tmp is not full or has proper rights.

robertjinx 10-07-2008 09:14 AM

Sorry check also /var/spool or /var in general if its not full.

bathory 10-07-2008 09:28 AM

Since you're talking for a Solaris box, you should set "EDITOR=vi" prior running crontab -e.

rajan.prabhakar 10-07-2008 09:31 AM

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

Interflex 10-07-2008 09:44 AM

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.

rajan.prabhakar 10-07-2008 09:57 AM

im not able to do this(crontab -e) for any user even root

and there are no entries than span two lines

Interflex 10-07-2008 10:30 AM

does crontab -l work?

is there a newline at the end of the file?

rajan.prabhakar 10-08-2008 01:42 AM

there is no blank line at the end

bathory 10-08-2008 02:21 AM

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.

Mr. C. 10-08-2008 03:06 AM

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.

jlliagre 10-09-2008 02:34 AM

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

rajan.prabhakar 10-10-2008 04:41 AM

Not working either

jlliagre 10-10-2008 04:50 AM

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 ?


All times are GMT -5. The time now is 02:22 AM.