[Remind-Fans] Using remind to run script daily if not weekend or holiday

David F. Skoll dfs at roaringpenguin.com
Fri May 9 16:14:13 EDT 2008


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.



More information about the Remind-fans mailing list