[Remind-Fans] Using remind to run script daily if not weekend or holiday
Justin Alcorn
justin at jalcorn.net
Fri May 9 16:26:01 EDT 2008
Someone put it in the Wiki!
On Fri, May 9, 2008 at 4:14 PM, David F. Skoll <dfs at roaringpenguin.com>
wrote:
> Gustav H Meyer wrote:
>
> > How can I use remind to act as a filter whereby it will check whether a
> > day falls on a holiday or weekend and thus only run on a real working
> day?
>
> # --- cut here and save as checkholiday.rem:
> # Don't run on weekends
> IFTRIG Sat Sun
> EXIT 1
> ENDIF
>
> # Pull in list of holidays
> INCLUDE list_of_holidays.rem
>
> # Don't run on holidays
> IF isomitted(today())
> EXIT 1
> ENDIF
>
> # Otherwise it's OK to run
> EXIT 0
> # --- end of checkholiday.rem
>
> Then in your shell script:
>
> remind checkholiday.rem && run_time_consuming_task
>
> Regards,
>
> David.
> _______________________________________________
> Remind-fans mailing list
> Remind-fans at lists.whatexit.org
> http://lists.whatexit.org/mailman/listinfo/remind-fans
>
--
--
Justin B. Alcorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roaringpenguin.com/pipermail/remind-fans/attachments/20080509/a9ae369e/attachment.htm>
More information about the Remind-fans
mailing list