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

Function calculateNextRunFromDeployment

apps/sim/background/schedule-execution.ts:263–277  ·  view source on GitHub ↗
(
  payload: ScheduleExecutionPayload,
  requestId: string
)

Source from the content-addressed store, hash-verified

261}
262
263async function calculateNextRunFromDeployment(
264 payload: ScheduleExecutionPayload,
265 requestId: string
266) {
267 try {
268 const deployedData = await loadDeployedWorkflowState(payload.workflowId)
269 return calculateNextRunTime(payload, deployedData.blocks as Record<string, BlockState>)
270 } catch (error) {
271 logger.warn(
272 `[${requestId}] Unable to calculate nextRunAt for schedule ${payload.scheduleId}`,
273 error
274 )
275 return null
276 }
277}
278
279async function determineNextRunAfterError(
280 payload: ScheduleExecutionPayload,

Callers 2

executeScheduleJobFunction · 0.85

Calls 3

calculateNextRunTimeFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected