Validate and describe cron expressions with human-readable output.
import { cron } from 'toolmetry';| Function | Parameters | Returns | Description |
|---|---|---|---|
cronValidate | expression: string | { valid, error, fields } | Validate a cron expression |
cronDescribe | expression: string | string | Get human-readable description |
import { cronValidate } from 'toolmetry';
const result = cronValidate('0 0 * * *');
// { valid: true, error: null, fields: {...} }import { cronDescribe } from 'toolmetry';
cronDescribe('0 0 * * *');
// "Cron: 0 0 * * * (at minute 0, at hour 0)"
cronDescribe('@daily');
// "Runs once a day (at midnight)"