(options: CreateTemporalScheduleInput)
| 353 | } |
| 354 | |
| 355 | async createSchedule(options: CreateTemporalScheduleInput): Promise<void> { |
| 356 | const client = await this.getScheduleClient(); |
| 357 | await client.create({ |
| 358 | scheduleId: options.scheduleId, |
| 359 | memo: options.memo, |
| 360 | spec: { |
| 361 | cronExpressions: [options.cronExpression], |
| 362 | timezone: options.timezone, |
| 363 | }, |
| 364 | action: { |
| 365 | type: 'startWorkflow', |
| 366 | workflowType: 'scheduleTriggerWorkflow', |
| 367 | taskQueue: this.defaultTaskQueue, |
| 368 | args: [options.dispatchArgs], |
| 369 | workflowId: `schedule-${options.scheduleId}`, |
| 370 | }, |
| 371 | policies: { |
| 372 | overlap: this.mapOverlapPolicy(options.overlapPolicy), |
| 373 | catchupWindow: options.catchupWindowSeconds |
| 374 | ? options.catchupWindowSeconds * 1000 |
| 375 | : undefined, |
| 376 | }, |
| 377 | }); |
| 378 | } |
| 379 | |
| 380 | async updateSchedule(options: UpdateTemporalScheduleInput): Promise<void> { |
| 381 | const client = await this.getScheduleClient(); |
no test coverage detected