[Remind-Fans] Can Someone Double-Check Me on These 'Remind' Expressions?

Paul Pelzl pelzlpj at eecs.umich.edu
Wed Aug 16 15:11:18 EDT 2006


On Wed, Aug 16, 2006 at 02:29:45PM -0400, Justin Alcorn wrote:
> Then this should give you the payday correct, but warn you even on Sat 
> and Sun:
> 
> REM 1 -2 OMIT Sat Sun +2 MSG %"Mike Payday%" %a%
> REM 15 -1 OMIT Sat Sun +2 MSG %"Mike Payday%" %a%
> 
> While this will warn you only on weekdays, completely ignoreing Sat and 
> Sun.  WARNING: I could be wrong.
> 
> REM 1 -2 OMIT Sat Sun +2 OMIT Sat Sun MSG %"Mike Payday%" %a%
> REM 15 -1 OMIT Sat Sun +2 OMIT Sat Sun MSG %"Mike Payday%" %a%
> 
> Hmmm...OK, interesting.   Thre reminders come up on Sat and Sun, but 
> ALSO the Thur and Fri before, so it DOES count back NOT INCLUDING sat 
> and sun.

The REM command ignores the order in which you list all the various
clauses, so you're not accomplishing anything by duplicating OMIT
statements and trying to logically group them with 'delta' and 'back'
parameters.  Here are the options you have:

If there is any local or global OMIT clause, then a "+N" 'delta' parameter
will skip over the omits when counting backward N days.  A "++N"
parameter will not skip any days.  The only real decision you can make
here is whether you want to receive your advance warning "N work days
ahead of time" or "exactly N days ahead of time."

If there is any local or global OMIT clause, then a "-N" 'back' parameter
will will skip over the omits when counting backward N days.  A "--N"
parameter will not skip any days.  This represents the difference
between choosing "N work days before the start of the month" or "exactly
N days before the start of the month."

I can move the datespec, delta, back, and omit clauses around however I
please (well, unless I do something weird enough to confuse the parser).
These all do the same thing:

   REM 1 -2 OMIT Sat Sun +2 MSG payday
   REM OMIT Sat Sun 1 +2 -2 MSG payday
   REM +2 OMIT Sat Sun -2 1 MSG payday

Hope that clarifies things,

Paul





More information about the Remind-fans mailing list