atv-dee-cron
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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) => {

          }
        }
      }
    },
  }
});

Package Sidebar

Install

npm i atv-dee-cron

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

11.1 kB

Total Files

5

Last publish

Collaborators

  • cqzs