[Remind-Fans] repeating with dynamic date_spec
Paul Pelzl
pelzlpj at eecs.umich.edu
Sun Apr 29 19:15:06 EDT 2007
On Sun, Apr 29, 2007 at 08:49:46AM +0200, Wolfgang Kroener wrote:
> Hi,
> I wanted to make an reminder for the thursday to monday around the
> second sunday of august. My first attempt was:
>
> rem sun 8 aug -3 satisfy 1
> rem [trigger(trigdate())] *1 until [trigger(trigdate()+4] msg foo
>
> Unfortunately the repeat *1 doesn't work when the date_spec is given in
> the dynamic way with []; I found nothing in the manpage about this
> problem. Does anyone have a solution for this type of reminder?
> Regards, Wolfgang
Actually, that syntax works fine. The problem you are running into is
caused by the fact that Remind only triggers on events that happen in
the future. When Remind is invoked for the date "Aug 9 2007", the first
line of your code triggers on that date. When it is invoked for the
date "Aug 10 2007", the first line of your code does not trigger until
*2008*, because the 2007 trigger date has already passed. (You can get
a better idea what's going on by invoking remind with the -dx debug
flag.)
A solution is to use SCANFROM to cause Remind to start its trigger date
search in the past. This snippet starts searching up to a week in the
past, and appears to work fine:
rem sun 8 aug -3 scanfrom [trigger(today()-7)] satisfy 1
rem [trigger(trigdate())] *1 until [trigger(trigdate()+4)] msg foo
Paul
More information about the Remind-fans
mailing list