MCPcopy Index your code
hub / github.com/codeaashu/claude-code / call

Function call

src/tools/ScheduleCronTool/CronCreateTool.ts:117–142  ·  view source on GitHub ↗
({ cron, prompt, recurring = true, durable = false })

Source from the content-addressed store, hash-verified

115 return { result: true }
116 },
117 async call({ cron, prompt, recurring = true, durable = false }) {
118 // Kill switch forces session-only; schema stays stable so the model sees
119 // no validation errors when the gate flips mid-session.
120 const effectiveDurable = durable && isDurableCronEnabled()
121 const id = await addCronTask(
122 cron,
123 prompt,
124 recurring,
125 effectiveDurable,
126 getTeammateContext()?.agentId,
127 )
128 // Enable the scheduler so the task fires in this session. The
129 // useScheduledTasks hook polls this flag and will start watching
130 // on the next tick. For durable: false tasks the file never changes
131 // — check() reads the session store directly — but the enable flag
132 // is still what starts the tick loop.
133 setScheduledTasksEnabled(true)
134 return {
135 data: {
136 id,
137 humanSchedule: cronToHuman(cron),
138 recurring,
139 durable: effectiveDurable,
140 },
141 }
142 },
143 mapToolResultToToolResultBlockParam(output, toolUseID) {
144 const where = output.durable
145 ? 'Persisted to .claude/scheduled_tasks.json'

Callers

nothing calls this directly

Calls 5

isDurableCronEnabledFunction · 0.85
addCronTaskFunction · 0.85
getTeammateContextFunction · 0.85
setScheduledTasksEnabledFunction · 0.85
cronToHumanFunction · 0.85

Tested by

no test coverage detected