1.0.4 • Published 8 years ago
think-crontab v1.0.4
think-crontab
How to use
src/config/crontab.js,
module.exports = [{
interval: '10s',
immediate: true,
handle: () => {
//do something
}
}, {
cron: '0 */1 * * *',
handle: 'crontab/test',
worker: 'all'
}]options
interval{String|Number} interval taskcron{String} cron taskworker{String} task type, one/all, default is onehandle{Function|String} task handle, requiredimmediate{Boolean} immediate to run task, default is falseenable{Boolean} enable task, default is true