Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix(cos): skip migrated scripts that duplicate default jobs by name

Adam Eivyc914e80e25e0
diff --git a/server/services/autonomousJobs.js b/server/services/autonomousJobs.js
index 061d2edaf3..07359ab446 100644
--- a/server/services/autonomousJobs.js
+++ b/server/services/autonomousJobs.js
@@ -455,9 +455,12 @@ async function migrateScriptsState(jobsData) {
return 'daily'
}
+ const existingNames = new Set(jobsData.jobs.map(j => j.name.toLowerCase()))
+
for (const script of scripts) {
const jobId = `job-migrated-${script.id}`
if (existingIds.has(jobId)) continue
+ if (existingNames.has(script.name.toLowerCase())) continue
const mappedInterval = mapLegacySchedule(script.schedule, script.name)
if (script.cronExpression) {