Skip to content

akyuujs/akyuu-schedule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

akyuu-schedule

redis adapter for akyuu

Installation

npm install akyuu-schedule

Configuration

Make sure you have a plugins section in your configuration file(s) and have scheduled folder in project root.

Usage

Config File

// ${project}/config/default/plugins.js

'use strict'

module.exports = {
    schedule: {
        enabled: true
    }
}

Tasks in scheduled folder

// {$project}/scheduled/${taskName}.js

'use strict'
module.exports = {
    plan: '*/10 * * * * *',  // cron plan, run task every 10s
    job: function () {
        // your task code
    }
};