![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crontab Question. | NycUnxer | UNIX for Dummies Questions & Answers | 9 | 11-14-2007 11:53 AM |
| CRONTAB Question | pauls_579 | UNIX for Dummies Questions & Answers | 2 | 01-23-2007 05:46 PM |
| Crontab question | ctcuser | Shell Programming and Scripting | 3 | 10-19-2006 09:22 AM |
| crontab question | steelrose | UNIX for Dummies Questions & Answers | 5 | 10-05-2005 12:07 AM |
| crontab question | Relykk | UNIX for Dummies Questions & Answers | 7 | 03-28-2004 08:02 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Thanks blowtorch. But it was in error that I used the -e option and was worried the the command I used would affect the crontab file. The command I wanted to use was crontab -l | more . With crontab using the vi editor and then more for the display I was worried it would affect the file
|
|
||||
|
Hi
1. crontab -e This command is used ONLY for editing/adding the crontabs in vi editor. 2. crontab -l This command just dispalys all crontabs at once, the file is not affected 3. crontab -l | more This command display the crontabs, incase you file happen to be large, hit the spacebar to view more. The file again is not affected. P.S: Make sure you have spare copy of your crontab file somewhere ![]() Regards Sumedha Last edited by Sumedha Sobti; 4 Weeks Ago at 07:45 AM.. |
|
|||||
|
Old admin point of vue:
using crontab -e : fine you modify etc... but many people do that without having a spare (copy somewhere), some admins when have to do strong maintenance e.g after a crash and under pression dont want things else disturbing then and simply delete the content of the cron spool.. else, if things dont work one day, how do you compare ? (noe previous copy...). So if you are not too confident, a good way to do things is to have your cronfile somewhere where all cron users can read (so they have no excuse in overlapping schedules...) I usually put them in /sm/cron/ , suffixed by your account name e.g confile.blondie, if paranoid make a second copy ( I do...) cronfile.blondie.last, before any modification you can compare (no one else modified without you knowing of you modified without updating...) lets say you put the cronfiles in /sm/cron Code:
cd /sm/cron crontab -l >cronfile.blondie diff blondie blondie.last then load the new file: Code:
vi cronfile.blondie crontab cronfile.blondie I add in comment where the file should be and its name: Code:
# ========================================================================= # /sm/cron/cronfile.prod prod's cronfile (crontab) # ========================================================================= # F O R M A T # ========================================================================= # Minute Hour Month_Day Month Weekday Command # (0-59) (0-23) (1-31) (1-12) (0-6)*0=sun run-string # ========================================================================= # |