# Why your cron job returns 404 after a rollback

Gregale · Updated 2026-12-04

Find a cron that still points to a newer route after rollback and verify the next scheduled run without deploying again.

If a Gregale cron starts returning HTTP 404 after a rollback, check which
`POST` routes exist in the restored release. [Gregale rolls back the code,
not the cron configuration](https://gregale.dev/docs/crons.md). A cron that still points to a
route introduced by the newer release can fire on time and still fail.

[Download the runnable drill](https://gregale.dev/examples/cron-rollback-404.zip). It uses an
internal-only test app, two releases and one cron. It does not need a database.

| Phase                   | Serving release | The same cron calls | Expected result                      |
| ----------------------- | --------------- | ------------------- | ------------------------------------ |
| Before rollback         | v2              | `POST /jobs/v2`     | The scheduled import succeeds.       |
| After rollback          | v1              | `POST /jobs/v2`     | The app returns HTTP 404.            |
| After updating the cron | v1              | `POST /jobs/v1`     | The scheduled import succeeds again. |

## 1. Check the route and the latest scheduled run

```sh
gregale cron list --app my-importer
gregale cron occurrences CRON_ID
gregale cron runs CRON_ID
```

A recorded `application returned HTTP 404` means the cron reached the app.
Compare the configured path and `POST` method to the restored release. Make
sure the failed occurrence was scheduled after the rollback took effect.
A failure queued earlier isn't evidence about the restored release.

The rollback CLI may warn about crons created after the target deployment.
That is a prompt to inspect those schedules, not a test of their routes. A
cron that existed before that deployment but was edited later can still need
attention.

## 2. Point the existing cron at a working handler

If the older handler still does the work you want, update the same cron:

```sh
gregale cron update CRON_ID --path /jobs/v1
gregale cron occurrences CRON_ID
```

Wait for the next scheduled occurrence and confirm it completes on the
restored release. In the drill, the schedule and cron ID stay the same.
The script checks the release receiving traffic, the scheduled invocation's
path and the success marker from the handler. There is no manual run and no
third deploy.

If the older release cannot safely do that work, pause the cron instead of
sending it to an unrelated route. On future releases, keep an old route
working during the rollback window or include schedule changes in the
rollback checklist.

## 3. Retry outages, not missing routes

A retry won't add a missing handler to v1. Fix the path or restore a release
that serves it. Use retry rules for temporary failures where another attempt
can succeed. See [the cron documentation](https://gregale.dev/docs/crons.md) for delivery behavior.

## Questions

### Why does my cron endpoint return 404 after rolling back?

Gregale restores the selected application release and keeps the current cron settings. The older release may not have a POST handler for the configured path.

### Do I need to redeploy to fix a cron path after rollback?

No, if the restored release has a compatible handler. Update the existing cron to point at that route and verify the next scheduled run on the restored release.

### Can retrying fix a cron that points to a missing route?

No. Correct the path or run a version that serves it. Retries are useful for temporary failures, not for a missing handler.

Canonical URL: https://gregale.dev/articles/cron-404-after-rollback

