Skip to content

CronScheduler

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/tools/cron.tool.ts

Methods

MethodSignatureReturns
parseIntervalparseInterval(schedule: string)`number
createcreate(schedule: string, message: string)`CronJob
deletedelete(id: string)boolean
listlist()Array<{ id: string; schedule: string; message: string; next_fire_at: number }>
disposedispose()void

Where it refuses work

  • CronScheduler stops the work with an early return when !job, in 2 places.
  • CronScheduler stops the work with an early return when !schedule.
  • CronScheduler stops the work with an early return when !match.
  • CronScheduler stops the work with an early return when intervalMs === null.

Was this page helpful?

Download as PDF