The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with cron job solne SUN Solaris 7 01-18-2008 05:57 PM
cron problem! blowtorch UNIX for Advanced & Expert Users 4 03-07-2006 10:12 PM
Problem with cron jhansrod AIX 2 11-25-2005 01:30 PM
cron problem VPN UNIX for Dummies Questions & Answers 2 04-16-2004 03:27 AM
Cron Problem Raiden Shell Programming and Scripting 4 11-16-2003 04:00 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-22-2007
Registered User
 

Join Date: Aug 2007
Posts: 23
cron job problem

I am trying to setup cronjob and once I start to save it is not working. This is what I am getting after I executed crontab -e, I am not even getting the privious entry and I am running from root.

crontab -e

421
10 3 * * * /usr/sbin/logadm
?
:wq
?

Why is it not saving? Any input is appreciated?
Reply With Quote
Forum Sponsor
  #2  
Old 12-22-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Type "crontab -l >crontab"

That should give you your current crontab.

Edit the file called "crontab"

Then do "crontab crontab" to put it back

And repeat "crontab -l" to confirm it has been set.
Reply With Quote
  #3  
Old 12-22-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
I agree with porter's suggestion's on how to use the crontab command safely. But to answer the question, you are not typing ed commands, so ed does not understand your input. That is why you get the question mark. It tells you that you made an error. You never asked ed to do anything, including display the current contents of the file. It is unforunate that crontab and other command default to running an antique editor. But you can control the editor which is used by setting your EDITOR environment variable. You really should set it to some editor you know so you don't find yourself in an alien editor.
Reply With Quote
  #4  
Old 12-22-2007
Registered User
 

Join Date: Aug 2007
Posts: 23
thank you, how to provide the edit command? I want to use vi as the default. Thanks in advance.
Reply With Quote
  #5  
Old 12-22-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by mokkan View Post
thank you, how to provide the edit command? I want to use vi as the default. Thanks in advance.

Code:
EDITOR=vi
export EDITOR
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0