Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

adonis-scheduler

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-scheduler - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "adonis-scheduler",
"version": "2.0.1",
"version": "2.0.2",
"description": "Easy task scheduling for AdonisJS",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -53,8 +53,8 @@ # Adonis Kue Provider

Jobs are easy to create. They live in `app/Tasks` and they are a simple class. They expose the following `static` properties:
Jobs are easy to create. They live in `app/Tasks` and they are a simple class. They expose the following properties:
| Name | Required | type | Description |
|-------------|----------|-----------|----------------------------------------------------------------|
| schedule | true | many | The schedule for which the task should run. [More docs.](https://github.com/node-schedule/node-schedule#cron-style-scheduling) |
| handle | true | function | A function that is called for this task. |
| Name | Required | Type | Static | Description |
|-------------|----------|-----------|--------|--------------------------------------------------------|
| schedule | true | many | true | The schedule for which the task should run. [More docs.](https://github.com/node-schedule/node-schedule#cron-style-scheduling) |
| handle | true | function | false | A function that is called for this task. |

@@ -61,0 +61,0 @@ [Here's an example.](examples/app/Tasks/Example.js)

@@ -38,3 +38,3 @@ 'use strict';

// Every task must expose a schedule
if (!taskInstance.schedule) {
if (!Task.schedule) {
throw new Error(`No schedule found for task: ${filePath}`);

@@ -49,6 +49,6 @@ }

// Track currently registered tasks in memory
this.registeredTasks.push(taskInstance);
this.registeredTasks.push(Task);
// Register task handler
this.instance.scheduleJob(taskInstance.schedule, taskInstance.handle);
this.instance.scheduleJob(Task.schedule, taskInstance.handle);
} catch (e) {

@@ -55,0 +55,0 @@ // If this file is not a valid javascript class, print warning and return

@@ -5,3 +5,3 @@ 'use strict';

get schedule() {
static get schedule() {
return '*/1 * * * * *';

@@ -8,0 +8,0 @@ }

@@ -5,3 +5,3 @@ 'use strict';

get schedule() {
static get schedule() {
return '*/1 * * * * *';

@@ -8,0 +8,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc