1.3.4 • Published 3 years ago

@use-services/cron v1.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Cron

import * as Cron from "@use-services/cron";
import * as handlersCron from "@/handlersCron";

const options = {
  cron: {
    init: Cron.init,
    args: {
      pollInterval: 500,
      handlers: handlersCron,
      crons: {
        everyFiveMinite: "*/5 * * * *",
      },
    },
    deps: ["redis"],
  } as Cron.Option<typeof handlersCron, Cron.Service<typeof handlersCron>>,
}

// in @/handlersCron.ts
import { Context } from "@use-services/cron";

export async function everyFiveMinite(ctx: Context) {

}
1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago