UNPKG

@use-services/cron

Version:

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

28 lines (22 loc) 526 B
# Cron ```ts 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) { } ```