Schedule jobs should trigger notifications on failure
What problem will this feature address?
Currently, scheduled jobs in Dokploy do not trigger notifications when they fail.
Even though logs are created, there is no way to get alerted via existing notification providers (Discord, Slack, etc).
Expected behavior:
- Trigger notification when a scheduled job fails
- Ideally include logs or error output
This would make scheduled tasks production-ready.
Describe the solution you'd like
I’d like scheduled jobs in Dokploy to trigger notifications when they fail, similar to how deploy and build errors are handled.
Specifically:
Add a new notification event for scheduled job failure Send alerts through existing providers (Discord, Slack, etc.) Include useful context in the notification: job name timestamp exit code error logs (or a link to logs)
Optionally:
Support notifications on success as well (configurable) Allow per-job notification settings
This would make scheduled tasks much more reliable in production, since failures wouldn’t go unnoticed.
Describe alternatives you've considered
.
Additional context
No response
Will you send a PR to implement it?
No
Hi! I'd like to pick this up. #2099 asked for the same thing last year, and #5168 covers the missing piece underneath (exposing each run's exit code via the API), so I'd treat the three as one gap seen from different sides.
Our case. We run several Schedule Jobs on a Compose service. When one fails there is no notification at all: the only reason we notice is that our own wrapper script catches the non-zero exit and posts the last log lines to a Discord channel itself. Every team running scheduled jobs ends up rebuilding that by hand.
Proposal (small, built on what already exists):
- A new notification event,
scheduleJobFailed(next to the existing build/deploy events), with its own toggle in each notification provider's settings. - Triggered where the schedule runner already collects the run result, whenever the exit code is non-zero (or the run errors before starting).
- Payload: job name, project / service (or server, for server jobs), started at, duration, exit code, and the last N lines of the run log (capped, N configurable with a sane default).
- Templates for every provider already supported (Discord, Slack, Telegram, email, Gotify, webhook…), following the same layout as the existing deploy-failed notification.
#5168's exit-code column and single-run read endpoint are a natural first step, so I'd split the work in two PRs: first the exit code / run result (tiny), then the notification on top of it.
If this shape works for the maintainers, I'll open the PRs against canary with tests and screenshots. Happy to adjust the design to whatever you prefer.