https://github.com/gocronx-team/gocron
distributed scheduled task management system
https://github.com/gocronx-team/gocron
cron crontab distributed gin go gocron goland scheduler task vite vue3
Last synced: 1 day ago
JSON representation
distributed scheduled task management system
- Host: GitHub
- URL: https://github.com/gocronx-team/gocron
- Owner: gocronx-team
- License: mit
- Created: 2025-10-27T08:22:16.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2026-07-05T03:12:30.000Z (2 days ago)
- Last Synced: 2026-07-05T03:14:58.658Z (2 days ago)
- Topics: cron, crontab, distributed, gin, go, gocron, goland, scheduler, task, vite, vue3
- Language: Go
- Homepage:
- Size: 51.5 MB
- Stars: 779
- Watchers: 23
- Forks: 55
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
- Awesome-GitHub-Repo - gocron - Go 语言开发的轻量级分布式定时任务管理系统,支持 Web 界面管理、crontab 精确到秒、任务失败重试、多用户权限控制和多数据库支持。 (开源工具 / 效率工具)
README
# gocron - Distributed scheduled Task Scheduler
[](https://github.com/gocronx-team/gocron/releases) [](https://github.com/gocronx-team/gocron/releases) [](https://github.com/gocronx-team/gocron/blob/master/LICENSE)
English | [简体中文](README_ZH.md)
A lightweight distributed scheduled task management system developed in Go, designed to replace Linux-crontab.
## 📖 Documentation
Full documentation is available at: **[document](https://gocron-docs.pages.dev/en/)**
- 🚀 [Quick Start](https://gocron-docs.pages.dev/en/guide/quick-start) - Installation and deployment guide
- 🤖 [Agent Auto-Registration](https://gocron-docs.pages.dev/en/guide/agent-registration) - One-click task node deployment
- ⚙️ [Configuration](https://gocron-docs.pages.dev/en/guide/configuration) - Detailed configuration guide
- 🔌 [API Documentation](https://gocron-docs.pages.dev/en/guide/api) - API reference
## ✨ Features
- **Web Interface**: Intuitive task management interface
- **Second-level Precision**: Supports Crontab expressions with second precision
- **High Availability**: Database-lock-based leader election, automatic failover in seconds
- **Task Retry**: Configurable retry policies for failed tasks
- **Task Dependency**: Supports task dependency configuration
- **Access Control**: Comprehensive user and permission management
- **2FA Security**: Two-Factor Authentication support
- **Agent Auto-Registration**: One-click installation for Linux/macOS
- **MCP Support**: Remote management by AI clients (Claude Desktop, Cursor, etc.) via the Model Context Protocol, secured with web-managed access tokens
- **AI Assist**: Natural-language to cron expression, AI-powered failure-log diagnosis, and an in-app AI ops chat assistant (query tasks/logs/hosts/templates, diagnose failures), backed by any OpenAI-compatible model (configurable endpoint, also works with self-hosted/local models)
- **Multi-Database**: MySQL / PostgreSQL / SQLite support
- **Log Management**: Complete execution logs with auto-cleanup
- **Notifications**: Email, Slack, Webhook support
## 🚀 Quick Start
The fastest way to try gocron is Docker Compose (builds the image from source locally):
```bash
# 1. Clone the project
git clone https://github.com/gocronx-team/gocron.git
cd gocron
# 2. Start services
docker compose up -d
# 3. Access Web Interface
# http://localhost:5920
```
> For production, binary deployment is recommended. See the [Installation Guide](https://gocron-docs.pages.dev/en/guide/quick-start) for all methods (Binary, Docker, Kubernetes, Development).
## 🔷 High Availability (Optional)
Deploy multiple gocron instances pointing to the same **MySQL/PostgreSQL** database. Leader election is automatic — no extra configuration needed. SQLite runs in single-node mode.
```bash
# Node 1
./gocron web --port 5920
# Node 2 (same database)
./gocron web --port 5921
```
See the [High Availability Guide](https://gocron-docs.pages.dev/en/guide/high-availability) for setup details, K8s deployment, and environment variable overrides.
## 📸 Screenshots
Scheduled Tasks
Agent Auto-Registration
Task Management
AI Failure Diagnosis
## 🤝 Contributing
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide.
One thing to note: commit messages are validated by a git hook
([commitlint](https://github.com/conventional-changelog/commitlint)), so use the
interactive commit tool instead of `git commit`:
```bash
pnpm install # first-time setup (installs git hooks)
pnpm run commit # create a properly formatted commit
```
## 📄 License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Star History
[](https://www.star-history.com/#gocronx-team/gocron&Date)