[Remind-Fans] Periodic Reminders Using Omits
Paul Pelzl
pelzlpj at eecs.umich.edu
Fri Mar 24 20:03:06 EST 2006
On Mon, Mar 20, 2006 at 08:30:14AM -0500, Jason Stein wrote:
> Our school uses a 6 day repeating schedule. I would like to create a reminder of what day it is. I need to omit weekends and specified school holidays. I tried something like
> omit 5 sep #labour day
> rem 31 aug 2005 skip *8 msg day 1
> rem 01 sep 2005 skip *8 msg day 2
> etc.
> With the hopes that the next day 1 would occur on sep 9. I would much rather just omit weekends instead of using an 8 day cycle because it won't always work, but I could get that to work either. Any suggestions. BTW I am a first time poster, so please be patient if there is an answer in the archives. I couldn't find it.
>
My current belief is that there is no (reasonable) way to do this.
The only conceivable algorithm for laying out the calendar properly is
to scan through every date in your school calendar one-by-one, skipping
weekends and holidays as you go, and keeping track of a count of days.
Remind offers a SCANFROM option, which looks promising at first, but the
syntax for expressions doesn't seem to provide a way to do any extra
computation or manipulation of state variables while that scan is being
performed.
The lack of looping constructs doesn't help either.
I did manage to get this far:
# globally omit whatever holidays you want
OMIT 1 Jan
OMIT 10 Mar
# initialize the counter
IF !defined("daycount")
SET daycount 1
PRESERVE daycount
ENDIF
# the counter loops through a six day rotation
FSET _next_day(x) choose(x, 2, 3, 4, 5, 6, 1)
# every day after Jan 1 could be a candidate for triggering, but
# omits get skipped
IFTRIG Jan 1 2006 *1 SKIP OMIT Sat Sun
REM [trigdate()] MSG "Day [daycount]"
SET daycount _next_day(daycount)
ENDIF
This will work *only* if you force remind to scan through a complete
block of days starting on some date at or before the start of the
semester, e.g. "rem -s3 Jan 1 2006" or "rem Jan 1 2006 *90".
Best I can do, maybe this will inspire someone else to come up with a
solution. If not, I think you're stuck doing the work yourself, and
writing down a different REM statement for each day. (Or if you're
clever, you can probably use a variation on the above script to print
out a few months worth of REM statements for you.)
Paul
More information about the Remind-fans
mailing list