|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Edit Crontab
Hi
I am new to Unix and would like some assistance. I need to edit the crontab file so that a script is set to run at 3:00 am each day. When I telnet to the sun server and type crontab -e a black screen appears and I am unable to make any changes. Could you advice on what is needed to edit the crontab file and what should the script say to achieve my goal. Regards |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Looks like you do not have a crontab file set up or its corrupted.
try crontab -l to list the crontab file... Still nothing... use the crontab -e to start your new crontab file enter the commands then save it. 3:00am each day would be 00 3 * * * /my/script/to/run > /dev/null 2>&1 do a man on crontab or cron for info |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Crontab Edit
Hi
Thanks for your response. I was able to locate the crontab file. Could you identify the actual steps to edit the file. There is a command string currently in place. How can I delete and replace. Can I use notepad or some other editing software to access the crontab file. Thanks |
|
#4
|
||||
|
||||
|
See this thread: http://www.unix.com/answers-frequently-asked-questions/13527-cron-crontab.html
Provides a good overview of how cron works. |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Juliet,
I'm not a unix guru, either, and I was mystifed by the crontab business at first. I don't know what your OS is... Mine is Solaris. When I first launched crontab -l or -e, my screen was not blank but it did just hang there without doing anything. This was because I had not specified any type of editor for my environment variables. Don't know if this might be your problem? First, I execute: export EDITOR=vi Then, I execute: crontab -e This brings up a vi editor into which the cron jobs are set up. If you are really really new to unix, you might not be familiar with vi, which is a unix text editor. Find a cheat sheet for vi, before you use it the first time. Like everyone has said, do NOT edit the crontab file directly. Only do it with the crontab -e command. Hope this helps, Shirley |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
Crontab Edit
Hi
Thanks for your response, I now believe I am gettin a little closer to resolving the issue. I typed export EDITOR=vi, and got this error message "EDITOR=vi: is not an identifier". Also could you identify where I can find a cheat sheet for vi. What should I do here. |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Search this site for "vi tutorial" and you will find a link to a README that includes tutorials for lots of unix stuff, including a couple specifically for vi.
As I mentioned, I am on Solaris. Perhaps you are on a different OS which would require a different syntax for setting the editor. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error when trying to edit crontab | bbbngowc | UNIX for Dummies Questions & Answers | 0 | 01-25-2010 12:05 PM |
| How to edit the crontab file | rajus19 | Shell Programming and Scripting | 2 | 05-25-2007 08:34 AM |
| Different edit crontab at Solaris..? | srilinux | Solaris | 25 | 12-17-2006 01:50 AM |
| edit crontab without -e | d_swapneel14 | Shell Programming and Scripting | 8 | 04-11-2006 03:50 AM |
| Can't edit crontab | FredSmith | UNIX for Dummies Questions & Answers | 1 | 10-24-2005 05:12 PM |
|
|