Heroku Scheduler Best Practices for Production

GuidesOscar van Ruiten

Heroku Scheduler can skip a run, run a job twice, or stop it partway. Make each job safe to repeat, let the next run catch up, finish well inside the interval, shut down cleanly on SIGTERM, stay under the one-off dyno limit, and report every result.

Disable a Heroku Scheduler Job Without Deleting It

GuidesOscar van Ruiten

You can add, edit, and delete Heroku Scheduler jobs, but not pause them, and maintenance mode doesn't stop them. Keep your jobs, check a config var at the top of each one, and switch them off and on with a single command.

How to Run a Heroku Scheduler Job Manually

GuidesOscar van Ruiten

Heroku Scheduler has no Run button, and heroku run skips the time to live a scheduled run gets. Start the job with heroku run:detached, then add the same TTL through the Platform API, so your test stops where a scheduled run would.

Heroku Scheduler Timeout: Why Your Job Stops at Its Interval

GuidesOscar van Ruiten

A Heroku Scheduler job that runs past its interval is stopped: Heroku sends the dyno SIGTERM, and on the Common Runtime it exits with status 143. Here is how to confirm that in your logs, and three ways to keep long work running to the end.