mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-18 20:35:24 +02:00
feat(schedules): add timezone support for scheduled jobs and update database schema
- Introduced a new `commonTimezones` array for timezone selection in the UI. - Updated the schedule form to include an optional timezone field. - Modified the database schema to add a `timezone` column to the `schedule` table. - Enhanced the scheduling logic to utilize the specified timezone, defaulting to UTC if not provided.
This commit is contained in:
@@ -30,6 +30,7 @@ export const scheduleRouter = createTRPCRouter({
|
||||
scheduleId: newSchedule.scheduleId,
|
||||
type: "schedule",
|
||||
cronSchedule: newSchedule.cronExpression,
|
||||
timezone: newSchedule.timezone,
|
||||
});
|
||||
} else {
|
||||
scheduleJob(newSchedule);
|
||||
@@ -49,6 +50,7 @@ export const scheduleRouter = createTRPCRouter({
|
||||
scheduleId: updatedSchedule.scheduleId,
|
||||
type: "schedule",
|
||||
cronSchedule: updatedSchedule.cronExpression,
|
||||
timezone: updatedSchedule.timezone,
|
||||
});
|
||||
} else {
|
||||
await removeJob({
|
||||
|
||||
@@ -19,6 +19,7 @@ type QueueJob =
|
||||
type: "schedule";
|
||||
cronSchedule: string;
|
||||
scheduleId: string;
|
||||
timezone?: string | null;
|
||||
}
|
||||
| {
|
||||
type: "volume-backup";
|
||||
|
||||
Reference in New Issue
Block a user