[Remind-Fans] help with "garbage day"
brian hammond
bhammond00 at yahoo.com
Thu Jan 25 16:05:32 EST 2007
Oh I think I get what you are doing. Mind if I double-check the logic since I'm not fully understanding SCANFROM?
# SCHEDULE TRASH DAY
# (locate first non-omitted weekday)
REM Mon AFTER SCANFROM [trigger(today()-2)] SATISFY 1
REM Mon AFTER - this triggers a Mon or the next possible day after consecutive omitted days. If a particular Mon was omitted, this would trigger the next day, Tues, assuming that Tues is itself not omitted.
SCANFROM [trigger(today()-2)] - start looking at each date from 2 days prior to today. What if today() is Thu? Mon won't be found, right? Shouldn't that be -7?
SATISFY 1 - "do nothing" since we don't want a msg displayed for the triggered date.
# (schedule trash day on the next non-omitted day
REM [trigger(trigdate()+1)] AFTER MSG trash
So the AFTER is here in case the next "non-omitted day" is in fact omitted?
Thanks, Brian
----- Original Message ----
From: Paul Pelzl <pelzlpj at eecs.umich.edu>
To: Users of the <remind-fans at whatexit.org>
Sent: Thursday, January 25, 2007 2:36:39 PM
Subject: Re: [Remind-Fans] help with "garbage day"
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
_______________________________________________
Remind-fans mailing list
Remind-fans at lists.whatexit.org
http://lists.whatexit.org/mailman/listinfo/remind-fans
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Remind-fans
mailing list