Repeated failure

A couple of days ago, Federico Viticci tweeted his wish list for a new or updated Reminders API and asked for other people for theirs. Stephen Hackett answered with this:

parameters for repeating tasks

Stephen’s simple request is exactly what I want, too. In fact, a way to script repeating tasks has been the top item on my wish list since well before Reminders existed.

How? Because Calendar—and iCal before it—has always had the same deficiency: nothing in its AppleScript dictionary (or now its Shortcuts action list) that addresses repeating items. Both Reminders and Calendar tease us by having repeating items available in the user interface

Reminders repeats

Calendar repeats

but no way to automate these capabilities directly.

If you’re working on a Mac, you can use Keyboard Maestro to simulate the various button clicks and menu selections needed to define a repeating item. I’ve done that for one particular type of repeating reminder that I create fairly often. But Apple shouldn’t make you rely on a third-party utility, especially when all the other attributes of calendar events and reminders are accessible through AppleScript and Shortcuts.1

So yes, Apple should add support for automating repeating items in Reminders and Calendar. But since Apple hasn’t bothered to do so in the 20 years that Calendar has been around, I’m not optimistic.

Update 4/24/2022 2:39 PM
Tobias (via Twitter) and George Green (via email) suggested creating an iCalendar file to automate recurring calendar events. Given that I used to use .ics files to get around the clumsiness of iCal’s date entry system, I should’ve thought to include a note about it in the post. Unfortunately, although Reminders tasks and Calendar events are related, I believe this trick is limited to Calendar events only.

John Flavin suggested the CalendarLib EC AppleScript library. It has a modify recurrence command that should do the trick.

CalendarLib EC modify recurrence command

But as with the iCalendar technique, it’s for Calendar events only, not Reminders.

Finally, Tobias (in another tweet) suggested using EventKit in a Swift script. Like CalendarLib EC, this would access the event database directly; unlike CalendarLib EC, it would work with Reminders as well as Calendar. This, along with Shortcuts’ support for Swift scripts, is making me think I should finally get around to learning Swift.

  1. Yes, you might be able to use UI Scripting, but UI Scripting is a tremendous pain in the ass—I have never found it to be as simple as Apple’s examples make it seem.