Hi everyone!
I’m working on using Temporal schedules to execute workflows periodically with the Go SDK. In one of my services, the entry point iterates over a list of already registered workflows, creating a schedule with a unique ID (derived from the workflow function name) and a cron expression for each.
For now, I’d like to “sync” Temporal’s schedules with a hardcoded list of ScheduleOptions
(will be stored in a DB to avoid race conditions) meaning:
- Creating schedules that don’t already exist (based on their ID)
- Updating existing schedules if their options, like the cron expression, have changed
- Deleting schedules that are no longer present in the list
Is there a Create Or Update
schedule primitive that considers the new schedule options?
Or is there a more efficient way to achieve this without implementing a full schedule “migration”?