[Remind-Fans] Looking for a way to specify a certain number of reminders

David F. Skoll dfs at roaringpenguin.com
Mon Mar 23 11:40:16 EDT 2009


Ian! D. Allen wrote:

> REM Mar 23 2009 *7 UNTIL [trigger(trigdate() + 21)]   MSG DEBUG 2 trigdate

That works for you?  Not for me:

$ remind foo.rem 23 march 2009
foo.rem(1): trigger(): Type mismatch
No reminders.

trigdate() is not valid until the final trigger date has been calculated.
So it's a chicken-and-egg situation.

(Hint: Yours *happened* to work because trigdate() was left over from
the previous reminder.  Yes, functions like trigdate() that rely on
side-effects from global variables internal to Remind are evil.
Remind itself is pretty evil...)

> FSET _repeat(date,period,count) "*"+period+" "+date+" UNTIL "+trigger(trigdate()+((count-1)*period))

Actually:

FSET _repeat(date,period,count) "*"+period+" "+trigger(date)+" UNTIL "+trigger(date+(count-1)*period)
#...
REM [_repeat('2009-03-23', 7, 4)] MSG use a function

is safer.



More information about the Remind-fans mailing list