Enhance scheduler functionality with timezone support and error handling
- Updated scheduling logic to utilize the guild's timezone for cron expressions and one-time scheduling. - Introduced a new `getGuildTimezone` function to retrieve the timezone from guild settings. - Enhanced error handling for scheduling inputs, providing localized error messages for invalid cron expressions and missing schedule times. - Improved the WebUI to support a new timing mode selection (once vs. cron) and updated input fields accordingly. - Added localization entries for new scheduling-related messages in both English and German. - Refactored job scheduling and removal logic to ensure proper handling of scheduled jobs in the queue.
This commit is contained in:
@@ -598,3 +598,20 @@
|
||||
- [ ] Online-Kanal zeigt sinnvolle Zahl (nicht dauerhaft 0)
|
||||
- [ ] Bot ohne „Kanäle verwalten“ → Config gespeichert; Bot-Log warnt; nach Permission-Fix erneut speichern
|
||||
|
||||
## Post-Phase – Scheduler Cron / Run-at Fix (Status: implementiert)
|
||||
|
||||
### Abgeschlossen (Code)
|
||||
|
||||
- Cron und einmaliges „Ausführen am“ nutzen die Guild-Zeitzone (`GuildSettings.timezone`)
|
||||
- Cron über BullMQ `upsertJobScheduler` inkl. `tz`; Delete entfernt Job-Scheduler korrekt
|
||||
- Dashboard: Timing-Mode (einmalig vs. Cron), naive `datetime-local` an Server, Fehlertexte i18n
|
||||
- Dark Mode: `color-scheme` + Input `text-foreground` für datetime-local Lesbarkeit
|
||||
- Shared Helper `resolveScheduleRunAt` / `guildLocalDateTimeToUtc`
|
||||
|
||||
### Manuell testen
|
||||
|
||||
- [ ] WebUI einmalig: Datum/Uhrzeit in Server-Zeitzone → Nachricht zur erwarteten lokalen Zeit
|
||||
- [ ] WebUI Cron `0 9 * * *` bei Europe/Berlin → ca. 09:00 Berlin (nicht UTC)
|
||||
- [ ] Cron-Plan löschen → keine weiteren Sends
|
||||
- [ ] Dark Mode: Cron-Feld und datetime-local lesbar/bedienbar
|
||||
|
||||
|
||||
Reference in New Issue
Block a user