HACKER Q&A
📣 seveibar

Best API format for recurring schedules?


I'm trying to develop a standard by which people can submit recurring schedules for things like thermostats and access codes for smart locks for seam.co. I couldn't find any standard for recurring schedules other than the iCalendar format, which seems a bit unwieldy for a JSON API.

Cron is a bit limited, e.g. doesn't represent ranges of time.

This seems like a really common problem, anybody solving this in their work today?


  👤 mooreds Accepted Answer ✓
I'd probably start with google calendar's docs.

Looks like it has a decent API for this: https://developers.google.com/calendar/api/guides/recurringe...

Edit: also this: https://developers.google.com/calendar/api/v3/reference/even...


👤 throwaway888abc

👤 jayknight
Many years ago, I built a calendaring system and I ended up implementing iCalendar but in a database instead of a file. I would not recommend doing it the way I did, but I did come to the conclusion that if you want to support the same types of recurrences, you really should be very familiar with how icalendar handles things or you'll forget something important.