From 15f979f08a969ab4f3d5461dad4a95d57ae43bcc Mon Sep 17 00:00:00 2001 From: Harry Adel Date: Wed, 18 Feb 2026 22:41:16 +0200 Subject: [PATCH] Fix unhandled Promise rejection in cron migration job callback The createCronJob method's job callback was not async and did not await this.runMigrationStep(step), causing the returned Promise to float. When runMigrationStep threw, the unhandled rejection triggered quave:synced-cron's global handler which called process.exit(0), crashing the app on startup. --- server/cronMigrationManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/cronMigrationManager.js b/server/cronMigrationManager.js index a1e9fb2c4..ec473d0b3 100644 --- a/server/cronMigrationManager.js +++ b/server/cronMigrationManager.js @@ -1646,8 +1646,8 @@ class CronMigrationManager { SyncedCron.add({ name: step.cronName, schedule: (parser) => parser.text(step.schedule), - job: () => { - this.runMigrationStep(step); + job: async () => { + await this.runMigrationStep(step); }, }); }