MCPcopy Create free account
hub / github.com/ShipSecAI/studio / createSchedule

Method createSchedule

backend/src/temporal/temporal.service.ts:355–378  ·  view source on GitHub ↗
(options: CreateTemporalScheduleInput)

Source from the content-addressed store, hash-verified

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();

Callers 2

api.tsFile · 0.45
createMethod · 0.45

Calls 3

getScheduleClientMethod · 0.95
mapOverlapPolicyMethod · 0.95
createMethod · 0.45

Tested by

no test coverage detected