Cron jobs do not stop on `process.exit(0)`

I tried setting up a Cron Job with Bun. I ran a script that ends with process.exit(0) and even when it hits that, the Cron Job stays running. The Cron Job only finishes when another Job gets started.

Are you certain that the script is reaching that function call?

I’ve got an extremely simple cron job that exits with process.exit(0) and it does succeed as expected.

Hmm I tried a bunch of things and now it seems to be working.

Maybe it was because I was doing bun run index.ts and didn’t have a process.exit(0) at some point?

That’s a possibility. Granted, if you had updated the underlying repo, it would have rebuilt (assuming auto-deploy is enabled).