@saflib/cron-http
@saflib/cron-http
Interfaces
| Interface | Description |
|---|---|
| CronEnqueueParams | Params for one cron-tick enqueue. Mirrored by @saflib/jobs-http makeCronEnqueuer so @saflib/cron-http does not import @saflib/jobs-http. |
| CronEnqueueResult | - |
| CronJobRequest | Static request payload for the operation a cron tick enqueues. Dynamic fan-out belongs in the target handler. |
| CronServiceOptions | Options to be passed when starting a cron service. |
| CustomLogErrorMeta | Data passed to the error callback. |
| JobConfig | Configuration for a single cron job. Cron ticks only enqueue; work runs through the target background operation. |
Type Aliases
| Type Alias | Description |
|---|---|
| CronEnqueuer | - |
| CustomLogError | Callback for handling when a job throws an error. |
| JobsMap | Map of job names to their configurations. |
Functions
| Function | Description |
|---|---|
| createCronRouter | Creates a router that your own Express app can include, in order to serve cron API endpoints. These provide runtime information and the ability do enable/disable cron jobs. They are only accessible to admin users. |
| runCron | Runs the cron jobs until the process is killed. Returns an array of cron jobs. |