{"record":{"id":"03200eb8025ce729","repo":"paperclipai/paperclip","slug":"job-job-jobkey-is-not-active-status-job-s","errorCode":null,"errorMessage":"Job \"${job.jobKey}\" is not active (status: ${job.status})","messagePattern":"Job \"(.+?)\" is not active \\(status: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-job-scheduler.ts","lineNumber":449,"sourceCode":"      }\n    }\n  }\n\n  // -----------------------------------------------------------------------\n  // Core: manual trigger\n  // -----------------------------------------------------------------------\n\n  async function triggerJob(\n    jobId: string,\n    trigger: \"manual\" | \"retry\" = \"manual\",\n  ): Promise<TriggerJobResult> {\n    const job = await jobStore.getJobById(jobId);\n    if (!job) {\n      throw new Error(`Job not found: ${jobId}`);\n    }\n\n    if (job.status !== \"active\") {\n      throw new Error(\n        `Job \"${job.jobKey}\" is not active (status: ${job.status})`,\n      );\n    }\n\n    // Overlap prevention\n    if (activeJobs.has(jobId)) {\n      throw new Error(\n        `Job \"${job.jobKey}\" is already running — cannot trigger while in progress`,\n      );\n    }\n\n    // Also check DB for running runs (defensive — covers multi-instance)\n    const existingRuns = await db\n      .select()\n      .from(pluginJobRuns)\n      .where(\n        and(\n          eq(pluginJobRuns.jobId, jobId),","sourceCodeStart":431,"sourceCodeEnd":467,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/plugin-job-scheduler.ts#L431-L467","documentation":"State guard in triggerJob: the job exists but its status is not active (paused, disabled, etc.), so manual triggers are refused. The job's lifecycle status is at fault; resume the job before triggering.","triggerScenarios":"Thrown at server/src/services/plugin-job-scheduler.ts:449 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Activate (enable) the job before triggering it, or check job.status and only trigger jobs whose status is active."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}