mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(schedules): add schedules server
This commit is contained in:
16
apps/schedules/src/schema.ts
Normal file
16
apps/schedules/src/schema.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const jobQueueSchema = z.discriminatedUnion("type", [
|
||||
z.object({
|
||||
cronSchedule: z.string(),
|
||||
type: z.literal("backup"),
|
||||
backupId: z.string(),
|
||||
}),
|
||||
z.object({
|
||||
cronSchedule: z.string(),
|
||||
type: z.literal("server"),
|
||||
serverId: z.string(),
|
||||
}),
|
||||
]);
|
||||
|
||||
export type QueueJob = z.infer<typeof jobQueueSchema>;
|
||||
Reference in New Issue
Block a user