[Remind-Fans] help with "garbage day"
Paul Pelzl
pelzlpj at eecs.umich.edu
Thu Jan 25 14:36:39 EST 2007
On Thu, Jan 25, 2007 at 10:41:57AM -0800, brian hammond wrote:
> Interesting... Thanks. That's close to what I had but I didn't get it all the way there.
>
> The only issue with this is that if a holiday falls on a Monday, the rest of the items aren't shifted ahead one day.
Crap, I misread your problem statement. The same sort of logic should
work, but you'll have to start by triggering on the first non-omitted
weekday:
# SCHEDULE TRASH DAY
# (locate first non-omitted weekday)
REM Mon AFTER SCANFROM [trigger(today()-2)] SATISFY 1
# (schedule trash day on the next non-omitted day
REM [trigger(trigdate()+1)] AFTER MSG trash
# SCHEDULE PAPER RECYCLING DAY
# (locate first non-omitted weekday)
REM Mon AFTER SCANFROM [trigger(today()-4)] SATISFY 1
# (locate trash day)
REM [trigger(trigdate()+1)] AFTER SCANFROM [trigger(today()-3)] SATISFY 1
REM [trigger(trigdate()+1)] AFTER MSG recycle paper
# SCHEDULE PLASTIC RECYCLING DAY
# (locate first non-omitted weekday)
REM Mon AFTER SCANFROM [trigger(today()-7)] SATISFY 1
# (locate trash day)
REM [trigger(trigdate()+1)] AFTER SCANFROM [trigger(today()-6)] SATISFY 1
# (locate paper recycling day)
REM [trigger(trigdate()+1)] AFTER SCANFROM [trigger(today()-5)] SATISFY 1
REM [trigger(trigdate()+1)] AFTER MSG recycle plastic
At this point things are getting a bit cumbersome. I'd really like to
reduce this to about four REM statements, but ran into some problems
with the way OMITs interact with SCANFROM. Perhaps someone else has a
better suggestion.
Paul
More information about the Remind-fans
mailing list