Added cron event handler
This commit is contained in:
19
src/interfaces/Cron.ts
Normal file
19
src/interfaces/Cron.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user