clockworklabs/SpacetimeDB · error · TypeError
Schedule target table is registered more than once in this s
Error message
Schedule target table is registered more than once in this schema. Use a distinct table handle for each scheduled table.
What it means
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.
Source
Thrown at crates/bindings-typescript/src/server/schema.ts:163
// Pending schedules come from two API paths:
// - legacy table({ scheduled }) schedules already know their tableName and
// scheduleAtCol because schema() resolves them while iterating table keys
// - reducer/procedure({ onSchedule }) schedules only know the table handle,
// so resolve them through tableSourceNames and reject duplicate table
// handle registrations because the target table name is ambiguous
const scheduledTables = new Map<string, string>();
for (const {
functionName: knownFunctionName,
reducer,
table,
tableName: knownTableName,
scheduleAtCol: knownScheduleAtCol,
} of this.pendingSchedules) {
let tableName = knownTableName;
if (tableName === undefined) {
const tableNames = this.tableSourceNames.get(table);
if (tableNames !== undefined && tableNames.length > 1) {
throw new TypeError(
'Schedule target table is registered more than once in this schema. Use a distinct table handle for each scheduled table.'
);
}
tableName = tableNames?.[0];
}
if (tableName === undefined) {
throw new TypeError(
'Schedule target table is not part of this schema.'
);
}
const scheduleAtCol = knownScheduleAtCol ?? table.scheduleAtCol;
if (scheduleAtCol === undefined) {
throw new TypeError(
`Table ${tableName} defines a schedule, but it does not have a ScheduleAt column.`
);
}
View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/bindings-typescript/src/server/schema.ts:163 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/338fe8bd86dfb055.
Report an issue: GitHub.