• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This library provides an easy way to schedule recurring tasks for AdonisJS.

Adonis Scheduler Provider

NPM Version Build Status Appveyor Coveralls

This library provides an easy way to schedule recurring tasks for AdonisJS v4.

Use branch adonis-v3 for AdonisJS version 3

Install

npm install --save adonis-scheduler

Configure

Register it in start/app.js:

const providers = [
  ...
  'adonis-scheduler/providers/SchedulerProvider'
]

const aliases = {
  ...
  Scheduler: 'Adonis/Addons/Scheduler'
}

Register the commands:

const aceProviders = [
  ...
  'adonis-scheduler/providers/CommandsProvider'
]

Usage

Starting the scheduler

Starting an instance of the kue listener is easy with the included ace command. Simply run node ace run:scheduler.

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.

Creating your first task

Jobs are easy to create. Run node ace make:task Example. They expose the following properties:

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.

More Repositories

1

adonis-kue

An AdonisJS provider for Kue
JavaScript
88
star
2

sleek

Sleek is a CLI tool for formatting SQL. It helps you maintain a consistent style across your SQL code, enhancing readability and productivity.
Rust
79
star
3

q3-server

My Quake 3 dedicated server configuration
Shell
64
star
4

flynn-certbot

A Certbot that you can run on your Flynn cluster
Shell
22
star
5

locdev

locdev is a handy CLI tool that simplifies the process of adding, removing, and listing entries in the hosts file.
Rust
21
star
6

adonis-storage

Storage provider for AdonisJS
JavaScript
21
star
7

docker-development-environment

Boilerplate for a productive local development environment powered by Docker
JavaScript
19
star
8

unisub

A Pub/Sub library for Rust backed by Postgres
Rust
15
star
9

atp

A command line tool for the Authenticated Transfer Protocol
Rust
13
star
10

quick-todo

An example web application using React, Firebase, and Ant Design
JavaScript
12
star
11

wrapulous

Wrapulous is a simple link shortening and click tracking API.
JavaScript
7
star
12

simple-cron

SimpleCron is a simple cron runner.
JavaScript
3
star
13

shotingblock

cocos2d-android game skeleton
3
star
14

python-package-boilerplate

A starter kit for publishing a python package
Python
2
star
15

ut-server

My Unreal Tourrnament dedicated server configuration
Shell
2
star
16

AsyncFragment

A simple wrapper for Android Fragments that shows a loading animation until you are ready to show content that has loaded asynchronously.
Java
2
star
17

adonis-queue

AdonisJS job queue using https://github.com/OptimalBits/bull
JavaScript
1
star
18

adonis-sms

JavaScript
1
star
19

homepage

HTML
1
star
20

dropbox-javascript

Javascript library for the Dropbox API
JavaScript
1
star
21

rucksack-api

An API to the Rucksack repository
Python
1
star
22

revelmgo

A Revel module for connecting to a MongoDB database use mgo
Go
1
star
23

naive-peer-discovery

A naΓ―ve peer discovery implementation
JavaScript
1
star