{"record":{"id":"338fe8bd86dfb055","repo":"clockworklabs/SpacetimeDB","slug":"schedule-target-table-is-registered-more-than-once","errorCode":null,"errorMessage":"Schedule target table is registered more than once in this schema. Use a distinct table handle for each scheduled table.","messagePattern":"Schedule target table is registered more than once in this schema\\. Use a distinct table handle for each scheduled table\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"crates/bindings-typescript/src/server/schema.ts","lineNumber":163,"sourceCode":"    // Pending schedules come from two API paths:\n    // - legacy table({ scheduled }) schedules already know their tableName and\n    //   scheduleAtCol because schema() resolves them while iterating table keys\n    // - reducer/procedure({ onSchedule }) schedules only know the table handle,\n    //   so resolve them through tableSourceNames and reject duplicate table\n    //   handle registrations because the target table name is ambiguous\n    const scheduledTables = new Map<string, string>();\n    for (const {\n      functionName: knownFunctionName,\n      reducer,\n      table,\n      tableName: knownTableName,\n      scheduleAtCol: knownScheduleAtCol,\n    } of this.pendingSchedules) {\n      let tableName = knownTableName;\n      if (tableName === undefined) {\n        const tableNames = this.tableSourceNames.get(table);\n        if (tableNames !== undefined && tableNames.length > 1) {\n          throw new TypeError(\n            'Schedule target table is registered more than once in this schema. Use a distinct table handle for each scheduled table.'\n          );\n        }\n        tableName = tableNames?.[0];\n      }\n      if (tableName === undefined) {\n        throw new TypeError(\n          'Schedule target table is not part of this schema.'\n        );\n      }\n\n      const scheduleAtCol = knownScheduleAtCol ?? table.scheduleAtCol;\n      if (scheduleAtCol === undefined) {\n        throw new TypeError(\n          `Table ${tableName} defines a schedule, but it does not have a ScheduleAt column.`\n        );\n      }\n","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/bindings-typescript/src/server/schema.ts#L145-L181","documentation":"Error \"Schedule target table is registered more than once in this schema. Use a distinct table handle for each scheduled table.\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/bindings-typescript/src/server/schema.ts:163 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}