[Remind-Fans] help with "garbage day"

brian hammond bhammond00 at yahoo.com
Thu Jan 25 19:25:27 EST 2007


OK I think I get this now after spending some time with a calendar :-)

When looking for the trash day, we want the first non-omitted day in a work week, then the day after that.  So we have to find a Mon and move AFTER it if needed.  Since the latest the trash day can be is Wed of a week, we only have to look 2 days back at most to find Monday.  If today() happens to be Thu, then we'd be scheduling the trash day for the next week since -2 from Thu is only Tue.

Some of your other offsets confused me a bit but after checking what I thought they should (or could be I guess), I got different numbers that seem to work.  Mine are simpler a little tighter.  The latest paper day can be is Thu of a week.  We find Mon (at most -3 away), then the next day (moving AFTER omitted days) to find trash day.  And again for paper day.  So you used -4 which also works since it would just start at Sun if today() is Thu.

And so on... OK.

I have another related query that I was waiting on but now that I understand SCANFROM, it wasn't that hard to figure out.  I'm sure there's a simpler way that I don't know.  "Bulk trash" day is the 2nd Fri of each month.  If there's a holiday in any work day of the 2nd week of the month, there's no bulk trash day that month.

# Find first non-omitted day in this week.  The furthest we can be 
# from today() is 4 days back (i.e. when today() is Fri).

REM Mon AFTER SCANFROM [trigger(today()-4)] SATISFY 1

# If the triggered date is Mon then the AFTER clause never kicked
# in which means there were no holidays this week.  When there's
# no holidays this week, we can try to satisfy the trigger Fri 8
# which means the first Fri after the 8th of the month which is 
# the 2nd Fri of the month.

IF WKDAYNUM(TRIGDATE()) == 1
  REM Fri 8 +2 MSG take out bulk trash %b
ENDIF

Let me know if this is wacky or fails in some case I haven't seen.

Thanks!
Brian

----- Original Message ----
From: brian hammond <bhammond00 at yahoo.com>
To: Users of the <remind-fans at whatexit.org>
Sent: Thursday, January 25, 2007 5:54:18 PM
Subject: Re: [Remind-Fans] help with "garbage day"

I'm confused, sorry!

If we use -7 and today() is Mon we'd start scanning from the previous Mon.  This could schedule a day in the previous week.  OK.

Can you explain the scanfrom start dates you've picked?  I don't understand where -2, -4, -7, -6, and -5 are coming from... I know what it means just not why you're start the scans from those offsets from today.

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 5:11:00 PM
Subject: Re: [Remind-Fans] help with "garbage day"

> 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?

If today() is Thursday, then this block will trigger next week Monday
(i.e. has no effect).  However the third block ("SCHEDULE PLASTIC
RECYCLING DAY") will trigger on the prior Monday and should therefore
schedule plastic recycling on today() (assuming no omits).

The danger in making the change you suggest is that you may cause Remind
to trigger trash day a week in the past, and thus miss it completely.





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
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