I would like to generate an array of runs given a specific date and time given a schedule spec:
...
spec: {
startAt: new Date(Date.now() + 1000),
skip: [{
comment: 'skip every 52nd minute',
minute: 52,
second: 0,
hour: '*',
},],
calendars: [
{
comment: 'every minute',
minute: '*',
second: 0,
hour: '*',
},
],
});
In Temporal Web UI I can see a list of upcoming runs:
I can also capture these runs using the SDK:
const schedules = await client.workflowService.describeSchedule({namespace: 'default', scheduleId: schedule.scheduleId});
if(schedule.info){
console.log(schedule.info.futureActionTimes)
}
But this only provides 10 upcoming runs. I would like to set the number, or generate the runs directly from the spec configuration.
Is there already a library I can use for this? Or must I write my own?