Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set up a cron job 2

Status
Not open for further replies.

brk6971

Technical User
Aug 10, 2007
9
US
Trying to set up a cron job on a solaris system to run a script
bash-3.2$ sudo crontab -e
4145
15****/usr/openv/scripts/nbmonitor >/nbmonitor/nbmonitor_out 2>&1 ?

?

?

?
^C
?
^C
?
^C
?
^C
?
^[^C
?
^C
?
The crontab file was not changed.

Can someone tell me what I am doing wrong?

Thanks

 
There are several threads on this forum (and others) for setting up cron jobs. Have you tried searching for 'cron' and/or 'crontab' and/or 'cronjob' ?

Personally, I don't advise using crontab -e as I have seen large crontab entries 'blanked out'.

Try:
crontab -l > /tmp/mycron.txt
vi /tmp/mycron.txt
crontab /tmp/mycron.txt


I hope that helps.

Mike
 
Looks to me that your default editor is set to ed. Do an:

export EDITOR=vi

(maybe put this in your startup profile for the future?)

and then try to crontab -e it and things should be clearer.
That said, I would echo Mike's advice re. copying first then applying the copy once you're happy with it, particularly if you're not really au-fait with vi itself.

Some days are diamonds, some days are rocks - make sure most are the former.
 
Thanks both suggestions were helpful
 
Thanks for the star - glad to help.

Some days are diamonds, some days are rocks - make sure most are the former.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top