Skip to main content
Scaffolds a cron job class and its test file into the target module, then registers the class in the cronJobs array of the module. It writes modules/<module>/src/crons/<Name>Cron.ts and modules/<module>/tests/crons/<Name>Cron.spec.ts, and installs the @ooneex/cron dependency if it is missing.

Usage

ooneex cron:create [options]

Examples

ooneex cron:create
ooneex cron:create --name=CleanExpiredTokens
ooneex cron:create --name=SendDailyReport --module=reporting --override

Options

OptionDescriptionDefault
--nameResource name (the Cron suffix is appended automatically).Prompted if omitted
--moduleTarget module.shared
--overrideOverwrite an existing file without confirmation.false

AI Skill

This command ships a matching cron:create skill. Your AI agent uses it to generate a new scheduled task class and its test file, then set the schedule, timezone, and handler for a job that extends the Cron base class from @ooneex/cron.
ooneex claude:init