Start and end dates for reminders?

I am trying to create a macro to display formatted text.
I am familiar with cron and time of day triggers which I often use for complicated reminders containing formatted text, links, etc.
I am looking for a way to be able to display a reminder from a certain date to another date (ie add start date and end date).
It does not seem possible with cron and time of day triggers. When I search the topic on Google, I read that there are some shell scripts that incorporate cron to add the interval between 2 dates.
I was wondering if anyone has any ideas
thanks in advance for your time and help

sample of output and input(s) ?

1 Like

display "hello world" every day at 9 pm between 26 July 2022 and 30 July 2022
thank you for your reply

Perhaps worth experimenting with this kind of pattern ?

Periodic greeting.kmmacros (2.7 KB)

1 Like

WOW !! you are brilliant. Thank you very much.

funny I often quote Pascal the same way
This script is long for want of the leisure to shorten it. (Blaise Pascal, Lettres Provinciales, 1657)

@ronald -- For a further tweak to @ComplexPoint's excellent solution, finish your macro with another test:

(ie make it self-disabling on the first run after you no longer need it).

It'll remove the (admittedly negligible) cost of repeatedly running a macro whose time has past and, perhaps more usefully, if you keep all this type of macros in the same Group you can quickly prune out the "old" reminders by looking for the disabled macros.


That's a good idea.

Incidentally we should, of course, probably be using something more like

NOW() < (TIME( 2022, 7, 30, 23, 59, 59) + GMTOFFSET())


NOW() < (TIME( 2022, 7, 30, 11, 59, 59) + GMTOFFSET())

for the later limit (23 vs 11)

( Updated above )

1 Like

thank you @ComplexPoint and @Nige_S !