[Remind-Fans] How to "Next days after 2nd Monday"
Paul Hoffman
nkuitse at nkuitse.com
Sat Jun 6 10:18:47 EDT 2009
On Fri, Jun 05, 2009 at 03:18:17PM +1100, Zoong PHAM wrote:
> Can someone please help me with this:
>
> I need to run 5 scripts, one on each day.
> The first script should start on the 2nd Monday of every month.
> The second script runs on the day after that Monday; and the third script
> on the 2nd day after that Monday, and so on.
>
>
> My 1st attempt was:
> REM Monday 7 AT 6:00 RUN script1
> REM Tuesday 7 AT 6:00 RUN script2
> ...
> REM Friday 7 AT 6:00 RUN script5.
>
> Then I realise that the script1 is running on the correct day. However,
> all the rests (Tuesday - Friday) are not.
> For example for May 2009, with my attempt, the script5 would run on
> Friday 8th. But I need to run script5 on Friday 15th because the 2nd
> Monday was 11th.
How about this?
REM Monday 7 AT 6:00 RUN script1 # Mon in [7th, 13th]
REM Tuesday 8 AT 6:00 RUN script2 # Tue in [8th, 14th]
...
REM Friday 11 AT 6:00 RUN script5 # Fri in [11th, 17th]
Paul.
--
Paul Hoffman <nkuitse at nkuitse.com>
More information about the Remind-fans
mailing list