From b6c6bb955d3c0ee5368fcf0db101b7dc74f686dc Mon Sep 17 00:00:00 2001 From: Nyk <0xnykcd@googlemail.com> Date: Mon, 2 Mar 2026 02:44:20 +0700 Subject: [PATCH] fix: send jobId/jobName instead of command when triggering cron jobs The triggerJob function was sending { command: job.command } to the API, but the backend expects jobId or jobName to identify the job. This caused all manual cron triggers to fail with "Job ID required" (400 error). Also adds the missing `id` field to the CronJob store interface so TypeScript recognizes the field already returned by the API. --- src/components/panels/cron-management-panel.tsx | 3 ++- src/store/index.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/panels/cron-management-panel.tsx b/src/components/panels/cron-management-panel.tsx index d7e767c..79cf3f8 100644 --- a/src/components/panels/cron-management-panel.tsx +++ b/src/components/panels/cron-management-panel.tsx @@ -98,7 +98,8 @@ export function CronManagementPanel() { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'trigger', - command: job.command + jobId: job.id, + jobName: job.name, }) }) diff --git a/src/store/index.ts b/src/store/index.ts index ed54c18..68c6dce 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -31,6 +31,7 @@ export interface LogEntry { } export interface CronJob { + id?: string name: string schedule: string command: string