MCPcopy
hub / github.com/nowork-studio/NotFair / createCron

Function createCron

notfair-cmo/src/server/scheduler/display.ts:314–328  ·  view source on GitHub ↗
(input: CreateCronInput)

Source from the content-addressed store, hash-verified

312}
313
314export async function createCron(input: CreateCronInput): Promise<CreateCronResult> {
315 const jobInput: CreateScheduledJobInput = {
316 project_slug: input.project_slug,
317 agent_id: input.agent_full_id,
318 name: input.cron_name,
319 cron_expr: input.schedule.expr,
320 message: input.message,
321 enabled: true,
322 };
323 const job = createScheduledJob(jobInput);
324 return {
325 id: job.id,
326 name: `${input.project_slug}/${input.agent_slug}/${input.cron_name}`,
327 };
328}
329
330/** Bucket occurrences into day-aligned arrays starting at `startOfFirstDay`. */
331export function groupOccurrencesByDay(

Callers 1

scheduleCronActionFunction · 0.90

Calls 1

createScheduledJobFunction · 0.90

Tested by

no test coverage detected