Added cron event handler

This commit is contained in:
2023-12-29 01:42:03 +01:00
parent b8d138bb0c
commit 7376c7ddd9
7 changed files with 495 additions and 3 deletions

19
src/interfaces/Cron.ts Normal file
View File

@@ -0,0 +1,19 @@
import { CronCommand } from "cron"
import { TimeZones } from "."
interface TimeFormat {
seconds: "*" | number
minutes: "*" | number
hours: "*" | number
dayOfMonth: "*" | number
month: "*" | number
dayOfWeek: "*" | number
}
export default interface Cron {
time: TimeFormat
execute: () => void
onComplete?: null | undefined
start?: boolean | null | undefined
timeZone: keyof TimeZones
}