Temporal Schedules Migrations

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”?

Hi @duckuks

There is now Create Or Update , please feel free to open an issue GitHub - temporalio/features: Behavior and history compatibility testing for Temporal SDKs

For now, I think you will need to get schedule to decide whether you have to create/update it.

Antonio

I guess you meant that there is NO Create Or Replace lol
Thanks for the quick reply! :heart_hands:

1 Like