[UFO Chicago] crontab bragging rights

Nate Riffe inkblot at movealong.org
Fri Aug 3 07:22:53 PDT 2007


Brian Sobolak said this (probably recently):
> "I bet my crontab is bigger than your crontab"
> 
>   -- Me, this week in a meeting.

Stupid crontab trick of the decade (I was going to write "of the day"
but I don't want to do a daily crontab trick):

Save a copy of your crontab in your home directory.  I call mine
".crontab".  Change its mode to 700.  Put this on the first line of
the file:

#!/usr/bin/crontab

Hooray!  Now you can simply edit this file and then *run it* to update
your crontab.

Want to make your crontab automatically update itself after you edit
it!?!?!??  Add this job to it and then run it manually (for the last
time!):

* * * * * $HOME/.crontab

The interpretter trick also works for screen and apache configuration
files.  Really it could potentially work for any program that can take
the name of its configuration file on the command line and uses # as
the comment marker.

Ok bye.

-- 
--< ((\))< >----< inkblot at movealong.org >----< http://www.movealong.org/ >--
pub  1024D/05A058E0 2002-03-07 Nate Riffe (06-Mar-2002) <inkblot at movealong.org>
     Key fingerprint = 0DAC F5CB D182 3165 D757  C466 CD42 12A8 05A0 58E0


More information about the ufo mailing list