# swarm-cronjob

> Open-source, self-hosted cron scheduler for Docker Swarm that turns services into recurring jobs via labels, with automatic discovery and time-zone support.

- **Category:** Automation
- **Licence:** MIT
- **Latest version:** v1.16.1
- **Open source:** oss
- **Languages:** Go
- **Platforms:** Docker, Linux, Systemd
- **Tags:** Automation, Devops, Scheduler, Cron, Swarm, Docker, Go, Golang, Docker Swarm, Job scheduling, Swarm mode, Cronjob, Docker Api, Service Labels

## Description

swarm-cronjob is an open-source scheduler that brings cron-style recurring jobs to a Docker Swarm cluster. Instead of running a separate cron daemon, you label Swarm services with `swarm.cronjob.enable` and `swarm.cronjob.schedule`, and the tool polls the Docker API to launch each job on time. It picks up newly deployed or modified services on its own, can skip a run when the target service is still busy, and honors a global time zone plus per-schedule CRON_TZ overrides. Replicated services (deployed at zero replicas) and global-mode services are both schedulable. Self-hosting is straightforward: deploy the container pinned to a manager node with the Docker socket mounted, or grab the binary and run it, optionally as a systemd unit on Debian-based distributions. There is no web UI; configuration is driven entirely by service labels, environment variables and CLI flags. Licensed under MIT.

## Links

- [Homepage](https://github.com/crazy-max/swarm-cronjob)
- [Website](https://crazymax.dev/swarm-cronjob/)
- [Docker](crazymax/swarm-cronjob)
- [GitHub Sponsors](https://github.com/sponsors/crazy-max)
- [Twitter](https://twitter.com/crazyws)

---
Source: https://selfhost.directory/project/swarm-cronjob