MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / formatCronSection

Function formatCronSection

src/utils/autonomyStatus.ts:96–112  ·  view source on GitHub ↗
(nowMs: number)

Source from the content-addressed store, hash-verified

94}
95
96async function formatCronSection(nowMs: number): Promise<string> {
97 const jobs = await listAllCronTasks()
98 if (jobs.length === 0) {
99 return ['Cron jobs: 0', ' none'].join('\n')
100 }
101 const lines = [`Cron jobs: ${jobs.length}`]
102 for (const job of jobs.slice(0, 10)) {
103 const next = nextCronRunMs(job.cron, nowMs)
104 lines.push(
105 ` ${job.id}: ${cronToHuman(job.cron)} ${job.recurring ? 'recurring' : 'one-shot'} ${job.durable === false ? 'session-only' : 'durable'} next=${next ? new Date(next).toLocaleString() : 'none'}`,
106 )
107 }
108 if (jobs.length > 10) {
109 lines.push(` ... ${jobs.length - 10} more job(s)`)
110 }
111 return lines.join('\n')
112}
113
114async function formatRuntimeSection(): Promise<string> {
115 const daemon = queryDaemonStatus()

Callers 1

Calls 4

listAllCronTasksFunction · 0.85
nextCronRunMsFunction · 0.85
cronToHumanFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected