atv-dee-cron
v1.0.0
Published
Lightweight Timing Task.
Downloads
5
Readme
Dee Cron Service
A cron service for dee framework
Limit
- 副本时间必须同步
Usage
import * as DeeCron from "atv-dee-cron";
Dee({
services: {
cron: {
initialize: DeeCron.init,
deps: ["redis"],
args: <DeeCron.Args>{
ns: 'cron', // namespace 同时也是 redis keyprefix
crons: { // https://tool.lu/crontab/
task1: '*/3 * * * *'
},
handlers: {
task1: async (ctx: DeeCron.Context) => {
}
}
}
},
}
});