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

Function fetchSchedule

apps/sim/hooks/queries/schedules.ts:55–70  ·  view source on GitHub ↗

* Fetches schedule data for a specific workflow block

(
  workflowId: string,
  blockId: string,
  signal?: AbortSignal
)

Source from the content-addressed store, hash-verified

53 * Fetches schedule data for a specific workflow block
54 */
55async function fetchSchedule(
56 workflowId: string,
57 blockId: string,
58 signal?: AbortSignal
59): Promise<ScheduleData | null> {
60 try {
61 const data = await requestJson(getScheduleContract, {
62 query: { workflowId, blockId },
63 signal,
64 })
65 return data.schedule || null
66 } catch (error) {
67 if (isApiClientError(error) && error.status === 404) return null
68 throw error
69 }
70}
71
72/**
73 * Fetch all schedules for a workspace.

Callers 1

useScheduleQueryFunction · 0.85

Calls 2

requestJsonFunction · 0.90
isApiClientErrorFunction · 0.90

Tested by

no test coverage detected