The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 07-03-2009
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,571
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
use vi to edit/modify
then load the new file:
Code:
vi cronfile.blondie
crontab cronfile.blondie
you can chack your update with crontab -l | more ...
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 
# =========================================================================
#
All the best