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

Function getNextRunFromCronExpression

apps/sim/app/api/schedules/execute/route.ts:113–120  ·  view source on GitHub ↗
(
  cronExpression?: string | null,
  timezone = 'UTC'
)

Source from the content-addressed store, hash-verified

111}
112
113function getNextRunFromCronExpression(
114 cronExpression?: string | null,
115 timezone = 'UTC'
116): Date | null {
117 if (!cronExpression) return null
118 const cron = new Cron(cronExpression, { timezone })
119 return cron.nextRun()
120}
121
122async function claimWorkflowSchedules(queuedAt: Date, limit: number) {
123 if (limit <= 0) return []

Callers 2

getScheduleNextRunAtFunction · 0.85
processScheduleItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected