My company runs a number of temporal workflows that we would like to run at a regular interval during off-hours. Ex: Monday-Friday between 8pm - 6am at 30 minute intervals.
I know that you can combine calendars
with intervals
so something like this which I believe would run Mon-Friday ~starting~ at 8pm and triggering once a day per the interval:
spec: {
timezone: 'America/New_York',
calendars: [
{ dayOfWeek: 'MONDAY', hour: 20 },
{ dayOfWeek: 'TUESDAY', hour: 20 },
{ dayOfWeek: 'WEDNESDAY', hour: 20 },
{ dayOfWeek: 'THURSDAY', hour: 20 },
{ dayOfWeek: 'FRIDAY', hour: 20 },
],
intervals: [{ every: '24h' }],
}
But it isn’t clear to me how I could initiate multiple workflow runs (Ex: every 30 minutes) and constrain it to a specific time window (Ex: 8pm - 6am).
I’m fairly certain this can be done using the temporal cron jobs, but there seem to be a number of drawbacks that we’d like to avoid by using those.