diff --git a/components/job_form.templ b/components/job_form.templ index ddc5314..c6df338 100644 --- a/components/job_form.templ +++ b/components/job_form.templ @@ -242,9 +242,250 @@ templ configSearchScript() { } +templ scheduleBuilderScript() { + +} + templ JobForm(ctx context.Context, data JobFormData) { @LayoutWithContext(getJobFormTitle(data.IsNew), ctx) { @configSearchScript() + @scheduleBuilderScript() @@ -310,10 +551,210 @@ templ JobForm(ctx context.Context, data JobFormData) { - - Schedule (Cron Expression) + + Schedule Type - + + Run at intervals + Run daily + Run weekly + Run monthly + Custom (Cron expression) + + + + + + + + Run every + + + + Unit + + Minutes + Hours + Days + + + + + + + + + + Run daily at + + + + + : + + + + + + + 24-hour format (00:00 - 23:59) + + + + + + + + Run on these days + + + + Sun + + + + Mon + + + + Tue + + + + Wed + + + + Thu + + + + Fri + + + + Sat + + + + + At this time + + + + + + + : + + + + + + + 24-hour format (00:00 - 23:59) + + + + + + + + + Day of month + + + + At this time + + + + + + + : + + + + + + + 24-hour format (00:00 - 23:59) + + + + + + + + @@ -324,11 +765,12 @@ templ JobForm(ctx context.Context, data JobFormData) { required class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="*/15 * * * *" + value="*/15 * * * *" /> - Use standard cron expression format. Example: */15 * * * * (every 15 minutes) + The schedule will be converted to a cron expression. Learn more @@ -471,17 +913,217 @@ templ JobForm(ctx context.Context, data JobFormData) { - - Schedule (Cron Expression) + + Schedule Type - + + Run at intervals + Run daily + Run weekly + Run monthly + Custom (Cron expression) + + + + + + + + Run every + + + + Unit + + Minutes + Hours + Days + + + + + + + + + + Run daily at + + + + + : + + + + + + + 24-hour format (00:00 - 23:59) + + + + + + + + Run on these days + + + + Sun + + + + Mon + + + + Tue + + + + Wed + + + + Thu + + + + Fri + + + + Sat + + + + + At this time + + + + + + + : + + + + + + + 24-hour format (00:00 - 23:59) + + + + + + + + + Day of month + + + + At this time + + + + + + + : + + + + + + + 24-hour format (00:00 - 23:59) + + + + + + + + - Use standard cron expression format. Example: */15 * * * * (every 15 minutes) + The schedule will be converted to a cron expression. Learn more @@ -614,7 +1256,7 @@ templ JobForm(ctx context.Context, data JobFormData) { Scheduling Tips - Need help with cron expressions? Try crontab.guru for a visual editor. Jobs can run multiple configurations in sequence, useful for multi-step transfer workflows. + Choose from simple interval, daily, weekly, or monthly schedules. For advanced scheduling needs, select "Custom" and use cron expression format. Jobs can run multiple configurations in sequence, useful for multi-step transfer workflows. diff --git a/internal/web/handlers/handler.go b/internal/web/handlers/handler.go index c96db1f..172ac2c 100644 --- a/internal/web/handlers/handler.go +++ b/internal/web/handlers/handler.go @@ -143,18 +143,18 @@ func (h *Handlers) BroadcastLog(level, message, source string) { // Only attempt to write to channel if there are clients if numClients > 0 { // *** DEBUG: Print channel send attempt *** - fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG-V4] Attempting to send to LogChannel: Level='%s', Source='%s'\n", level, source) + fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG] Attempting to send to LogChannel: Level='%s', Source='%s'\n", level, source) // Try to send the log entry to the channel with a timeout select { case LogChannel <- logEntry: // Successfully sent - fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG-V4] Successfully sent to LogChannel.\n") + fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG] Successfully sent to LogChannel.\n") case <-time.After(100 * time.Millisecond): // Channel is full or blocked, log and continue - fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG-V4] Log channel timeout, discarding log entry: %s\n", message) + fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG] Log channel timeout, discarding log entry: %s\n", message) } } else { - fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG-V4] No clients connected, skipping send to LogChannel.\n") + fmt.Fprintf(os.Stderr, "[DEBUG-BROADCASTLOG] No clients connected, skipping send to LogChannel.\n") } }
- Use standard cron expression format. Example: */15 * * * * (every 15 minutes) + The schedule will be converted to a cron expression. Learn more
- Need help with cron expressions? Try crontab.guru for a visual editor. Jobs can run multiple configurations in sequence, useful for multi-step transfer workflows. + Choose from simple interval, daily, weekly, or monthly schedules. For advanced scheduling needs, select "Custom" and use cron expression format. Jobs can run multiple configurations in sequence, useful for multi-step transfer workflows.