Skip to content

Commit eeb3ad9

Browse files
committed
fix(api): update date comparison logic in getDueCronTriggers to use Unix timestamp
1 parent d843e72 commit eeb3ad9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/api/src/db/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ export async function getDueCronTriggers(
12081208
.where(
12091209
and(
12101210
eq(cronTriggers.active, true),
1211-
sql`${cronTriggers.nextRunAt} <= ${now.getTime()}`
1211+
sql`${cronTriggers.nextRunAt} <= ${Math.floor(now.getTime() / 1000)}`
12121212
)
12131213
)
12141214
.innerJoin(workflows, eq(workflows.id, cronTriggers.workflowId))

0 commit comments

Comments
 (0)