From d3292a28109d896c37ab61e185607727a4c51fed Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Fri, 8 May 2026 23:15:04 -0600 Subject: [PATCH] feat(schedules): add optional description field to schedule form and display - Updated the schedule form schema to include an optional 'description' field. - Enhanced the form to allow users to input a description for each schedule. - Modified the schedule display component to show the description if available. - Added a database migration to include the 'description' column in the schedule table. --- .../schedules/handle-schedules.tsx | 23 + .../application/schedules/show-schedules.tsx | 5 + apps/dokploy/drizzle/0166_nosy_slapstick.sql | 1 + apps/dokploy/drizzle/meta/0166_snapshot.json | 8318 +++++++++++++++++ apps/dokploy/drizzle/meta/_journal.json | 7 + packages/server/src/db/schema/schedule.ts | 1 + 6 files changed, 8355 insertions(+) create mode 100644 apps/dokploy/drizzle/0166_nosy_slapstick.sql create mode 100644 apps/dokploy/drizzle/meta/0166_snapshot.json diff --git a/apps/dokploy/components/dashboard/application/schedules/handle-schedules.tsx b/apps/dokploy/components/dashboard/application/schedules/handle-schedules.tsx index 36ddb53f1..3fd3089de 100644 --- a/apps/dokploy/components/dashboard/application/schedules/handle-schedules.tsx +++ b/apps/dokploy/components/dashboard/application/schedules/handle-schedules.tsx @@ -80,6 +80,7 @@ export const commonCronExpressions = [ const formSchema = z .object({ name: z.string().min(1, "Name is required"), + description: z.string().optional(), cronExpression: z.string().min(1, "Cron expression is required"), shellType: z.enum(["bash", "sh"]).default("bash"), command: z.string(), @@ -224,6 +225,7 @@ export const HandleSchedules = ({ id, scheduleId, scheduleType }: Props) => { resolver: standardSchemaResolver(formSchema), defaultValues: { name: "", + description: "", cronExpression: "", shellType: "bash", command: "", @@ -263,6 +265,7 @@ export const HandleSchedules = ({ id, scheduleId, scheduleType }: Props) => { if (scheduleId && schedule) { form.reset({ name: schedule.name, + description: schedule.description || "", cronExpression: schedule.cronExpression, shellType: schedule.shellType, command: schedule.command, @@ -479,6 +482,26 @@ export const HandleSchedules = ({ id, scheduleId, scheduleType }: Props) => { )} /> + ( + + Description + + + + + Optional description of what this schedule does + + + + )} + /> + { {schedule.enabled ? "Enabled" : "Disabled"} + {schedule.description && ( +

+ {schedule.description} +

+ )}
nanoid()), name: text("name").notNull(), + description: text("description"), cronExpression: text("cronExpression").notNull(), appName: text("appName") .notNull()