MCPcopy Index your code
hub / github.com/simstudioai/sim / buildScheduleExecutionJobId

Function buildScheduleExecutionJobId

apps/sim/app/api/schedules/execute/route.ts:103–111  ·  view source on GitHub ↗
(schedule: {
  id: string
  nextRunAt?: Date | null
  lastQueuedAt?: Date | null
})

Source from the content-addressed store, hash-verified

101}
102
103function buildScheduleExecutionJobId(schedule: {
104 id: string
105 nextRunAt?: Date | null
106 lastQueuedAt?: Date | null
107}): string {
108 const occurrence =
109 schedule.nextRunAt?.toISOString() ?? schedule.lastQueuedAt?.toISOString() ?? 'due'
110 return `schedule_${sha256Hex(`${schedule.id}:${occurrence}`).slice(0, 32)}`
111}
112
113function getNextRunFromCronExpression(
114 cronExpression?: string | null,

Callers 1

processScheduleItemFunction · 0.85

Calls 1

sha256HexFunction · 0.90

Tested by

no test coverage detected