redis adapter for akyuu
npm install akyuu-schedule
Make sure you have a plugins
section in your configuration file(s) and have scheduled
folder in project root.
// ${project}/config/default/plugins.js
'use strict'
module.exports = {
schedule: {
enabled: true
}
}
// {$project}/scheduled/${taskName}.js
'use strict'
module.exports = {
plan: '*/10 * * * * *', // cron plan, run task every 10s
job: function () {
// your task code
}
};