[HPADM] Cron help

From: Whittemore, Dale (dale.whittemore_at_lmco.com)
Date: 11/25/03

  • Next message: Abramson, Stuart: "[HPADM] Matching/substituting two strings in ksh ??"
    Date: Tue, 25 Nov 2003 10:11:46 -0700
    To: hpux-admin@dutchworks.nl
    
    

    I think I know the answer to this one but I wanted to check with the rest of you.

    Given the following line in the crontab file:

    min hour dom mon dow script to run
    00 18 1-7 * 0 /usr/local/bin/<script>
    00 18 8-31 * 0 /usr/local/bin/<script2>

    <script> will run at 6:00pm the first 7 days of the month then every Sunday there after?
    I tried the above in the cron starting on 11/20 and <script2> ran from the 20th thru the 23rd before I caught it.

    What I was hoping to accomplish is for <script> to run on the first Sunday of the month and have <script2> run the other Sundays. Is there a way, using the cron, to accomplish what I was hoping for? Buying a third party job scheduling package would be nice but is not an option at this time.
    I have already modified <script> to do a check of the day-of-week and day-of-month and if it is Sunday and the day-of-month is less than 8, execute otherwise exit.

    Thanks

    Dale A. Whittemore
    Computer Systems Analyst, Senior
    Lockheed Martin Enterprise Information Systems
    Denver, Colorado

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Abramson, Stuart: "[HPADM] Matching/substituting two strings in ksh ??"

    Relevant Pages