Re: Script to activate TSM-scheduler not in first week of month

From: Ross Alexander (ralexan9@telusplanet.net)
Date: Mon Dec 16 2002 - 17:33:48 EST


On Mon, 16 Dec 2002, brian welsh wrote:

> Hello,
>
> Script question.
>
> For some reason a client using TSM will back-up his data every day, except
> the first week of the month.
>
> I can't schedule this within TSM so I have to make a script. No I have a
> problem how I can trigger if days are in the first week of the months. What
> days will be in the first week and so on are in this case not that
> important.
>
> Hope someone can give me a hint.

    #!/usr/bin/ksh
    #
    # test whether today is within the first week (== 7 days) of the month.
    # if so, bail out.
    # otherwise continue script execution.
    #
    [[ $(date +%d) -lt 8 ]] && exit 0

    # if we get here, today is not in the first 7 days of the month.
    #
    .....

regards,
Ross

--
Ross Alexander
(780) 975 3505 cell / (780) 433 6725 home
ralexan9@telusplanet.net


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