Operating System - HP-UX
1833464 Members
3136 Online
110052 Solutions
New Discussion

Re: why does crontab -e look like this ?

 
SOLVED
Go to solution
Rob Johnson_3
Regular Advisor

why does crontab -e look like this ?

I have a standard user ID on a customers box. When I run crontab -e like I know how to do to edit my crontab entry, I don't get what I'm used to seeing. I can enter a "q" then press return and get the $ prompt back.

Any idea what the problem might be?

$ crontab -e
0
5 REPLIES 5
Michael Denney
Valued Contributor

Re: why does crontab -e look like this ?

Your crontab is empty.
Steven E. Protter
Exalted Contributor

Re: why does crontab -e look like this ?

Shalom,

Your crontab has been mostly erased.

/var/spool/cron

Restore the files there and you will have a cron schedule again.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: why does crontab -e look like this ?

Hi Rob:

I prefer never to edit a crontab using the '-e' switch. Instead I do:

# crontab -l > /tmp/crontab
[ edit ]
# crontab /tmp/crontab

Regards!

...JRF...
Patrick Wallek
Honored Contributor
Solution

Re: why does crontab -e look like this ?

What editor do you usually use?

It appears that your editor environment variable has been set to 'ed' rather than 'vi'.

Try this:

echo $EDITOR

If it returns 'ed' then do:

export EDITOR=vi

Now try to run 'crontab -e' again and see if you get what you expect.

The '0' you get is indicating that there are 0 characters in the crontab file.
Rob Johnson_3
Regular Advisor

Re: why does crontab -e look like this ?

export EDITOR=vi corrected it.

Thnks for the quick replies!!!!