Re: Question about crontab

From: Ford, Phillip (phillip.ford@SPCORP.COM)
Date: Mon Sep 16 2002 - 14:03:33 EDT


We do it by running a cron script every Monday at your time. The first
thing the script does is get the day of the month. If the day of the month
is less then 8 then this is the first Monday of the month.

dayn=`date +%d`
if $dayn > 7 then exit
It is the first day of the month so do my work

Hope this helps

--
Phillip Ford
Senior Software Specialist
Corporate Computer Center
Schering-Plough Corp.
(901) 320-4462
(901) 320-4856 FAX
phillip.ford@spcorp.com
-----Original Message-----
From: Drew Wrobel [mailto:Andrew_Wrobel@PepBoys.com]
Sent: Monday, September 16, 2002 12:41 PM
To: aix-l@Princeton.EDU
Subject: Question about crontab
     I have a need to run a script at 11pm on the first monday of every
month.
     I'm a bit confused as to what the crontab entry should look like.
     I know what the entry would look like for the first of the month, run a
script on a monday.  But not on the first monday of every month.
     Am I just confused or is this logical that would need to be put into
the script?
     Thanks
***************************************************************
 This message and any attachments is solely for the intended recipient. If
you are not the intended recipient, disclosure, copying, use, or
distribution of the information included in this message is prohibited --
please immediately and permanently delete this message.


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:12 EDT