Package Exports
- adonis5-scheduler
- adonis5-scheduler/build/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (adonis5-scheduler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Table of contents
adonis5-scheduler
AdonisJS5, cron, cronjob, scheduler
This library provides an easy way to schedule recurring tasks for AdonisJS v5.
Installation
Install it:
npm i adonis5-schedulerConnect all dependences:
node ace invoke adonis5-schedulerUsage
Creating your first task
node ace make:task MyTaskNameStarting the scheduler
Starting an instance of the kue listener is easy with the included ace command.
The provider looks for jobs in the app/Tasks directory of your AdonisJS project and will automatically register a handler for any tasks that it finds.
node ace scheduler:run| Name | Required | Type | Static | Description |
|---|---|---|---|---|
| schedule | true | many | true | The schedule for which the task should run. More docs. |
| handle | true | function | false | A function that is called for this task. |
Thanks
Special thanks to the creator(s) of AdonisJS for creating such a great framework and nrempel creator scheduler package for Adonis v4
