Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 653 Bytes

README.md

File metadata and controls

39 lines (30 loc) · 653 Bytes

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
    }
};