webdevops / Go Crond
Licence: gpl-2.0
⏰ Cron daemon written in golang (for eg. usage in docker images)
Stars: ✭ 59
Projects that are alternatives of or similar to Go Crond
Chronos
Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
Stars: ✭ 4,303 (+7193.22%)
Mutual labels: cron, crontab
Dynamic Wallpaper
A simple bash script to set wallpapers according to current time, using cron job scheduler.
Stars: ✭ 762 (+1191.53%)
Mutual labels: cron, crontab
php-cron-expr
Ultra lightweight, Dependency free and Super Fast Cron Expression parser for PHP
Stars: ✭ 42 (-28.81%)
Mutual labels: cron, crontab
Bree
🚥 The best job scheduler for Node.js and JavaScript with cron, dates, ms, later, and human-friendly support. Works in Node v10+ and browsers, uses workers to spawn sandboxed processes, and supports async/await, retries, throttling, concurrency, and graceful shutdown. Simple, fast, and lightweight. Made for @ForwardEmail and @ladjs.
Stars: ✭ 933 (+1481.36%)
Mutual labels: cron, crontab
Cron Utils
Cron utils for parsing, validations and human readable descriptions as well as date/time interoperability.
Stars: ✭ 724 (+1127.12%)
Mutual labels: cron, crontab
asparagus
An easy to use task scheduler for distributed systems
Stars: ✭ 14 (-76.27%)
Mutual labels: cron, crontab
Vue Cron Generator
Cron Generator Implemented by Vue.js and Element-ui(基于Vue&Element-UI构建的在线Cron表达式生成器)
Stars: ✭ 48 (-18.64%)
Mutual labels: cron, crontab
mi-cron
📆 A microscopic parser for standard cron expressions.
Stars: ✭ 16 (-72.88%)
Mutual labels: cron, crontab
croncal
Utility to convert a crontab file to a list of actual events within a date range.
Stars: ✭ 37 (-37.29%)
Mutual labels: cron, crontab
LexikCronFileGeneratorBundle
This symfony bundle provides service for generate cron file
Stars: ✭ 20 (-66.1%)
Mutual labels: cron, crontab
Cron Parser
Node.js library for parsing crontab instructions
Stars: ✭ 802 (+1259.32%)
Mutual labels: cron, crontab
Deno cron
A cron Job scheduler for Deno that allows you to write human readable cron syntax with tons of flexibility
Stars: ✭ 35 (-40.68%)
Mutual labels: cron, crontab
go-crond
A cron daemon written in golang
Inspired by https://github.com/anarcher/go-cron
Using https://godoc.org/github.com/robfig/cron
Docker images
on Docker hub
-
webdevops/go-crond:alpine
(based onalpine
) -
webdevops/go-crond:ubuntu
(based onubuntu:latest
) -
webdevops/go-crond:debian
(based ondebian:stable-slim
) -
webdevops/go-crond:{version}-alpine
(based onalpine
) -
webdevops/go-crond:{version}-ubuntu
(based onubuntu:latest
) -
webdevops/go-crond:{version}-debian
(based ondebian:stable-slim
)
Features
- system crontab (with username inside)
- user crontabs (without username inside)
- run-parts support
- Logging to STDOUT and STDERR (instead of sending mails)
- Keep current environment (eg. for usage in Docker containers)
- Supports Linux, MacOS, ARM/ARM64 (Rasbperry Pi and others)
Usage
Usage:
go-crond [user:crontab] [user:crontab]…
Application Options:
--default-user= Default user (default: root)
--include= Include files in directory as system crontabs (with user)
--auto Enable automatic system crontab detection
--run-parts= Execute files in directory with custom spec (like run-parts; spec-units:ns,us,s,m,h; format:time-spec:path; eg:10s,1m,1h30m)
--run-parts-1min= Execute files in directory every beginning minute (like run-parts)
--run-parts-15min= Execute files in directory every beginning 15 minutes (like run-parts)
--run-parts-hourly= Execute files in directory every beginning hour (like run-parts)
--run-parts-daily= Execute files in directory every beginning day (like run-parts)
--run-parts-weekly= Execute files in directory every beginning week (like run-parts)
--run-parts-monthly= Execute files in directory every beginning month (like run-parts)
--allow-unprivileged Allow daemon to run as non root (unprivileged) user
-V, --version show version and exit
--dumpversion show only version number and exit
-h, --help show this help message
-v, --verbose verbose mode [$VERBOSE]
--log.json Switch log output to json format [$LOG_JSON]
--server.bind= Server address, eg. ':8080' (/healthz and /metrics for prometheus) [$SERVER_BIND]
--server.metrics Enable prometheus metrics (do not use senstive informations in commands -> use environment variables or files for storing these informations) [$SERVER_METRICS]
Crontab files can be added as arguments or automatic included by using eg. --include=crond-path/
Examples
Run crond with a system crontab:
go-crond examples/crontab
Run crond with user crontabs (without user in it) under specific users:
go-crond \
root:examples/crontab-root \
guest:examples/crontab-guest
Run crond with auto include of /etc/cron.d and script execution of hourly, weekly, daily and monthly:
go-crond \
--include=/etc/cron.d \
--run-parts-hourly=/etc/cron.hourly \
--run-parts-weekly=/etc/cron.weekly \
--run-parts-daily=/etc/cron.daily \
--run-parts-monthly=/etc/cron.monthly
Run crond with run-parts with custom time spec:
go-crond \
--run-parts=1m:/etc/cron.minute \
--run-parts=15m:/etc/cron.15min
Run crond with run-parts with custom time spec and different user:
go-crond \
--run-parts=1m:application:/etc/cron.minute \
--run-parts=15m:admin:/etc/cron.15min
Installation
GOCROND_VERSION=20.7.0 \
&& wget -O /usr/local/bin/go-crond https://github.com/webdevops/go-crond/releases/download/$GOCROND_VERSION/go-crond-64-linux \
&& chmod +x /usr/local/bin/go-crond
Docker images
Image | Description |
---|---|
webdevops/go-crond:latest |
Latest release, binary only |
webdevops/go-crond:master |
Current development version in branch master
|
Metrics
go-crond exposes Prometheus metrics on :8080/metrics
if enabled.
Metric | Description |
---|---|
gocrond_task_info |
List of all cronjobs |
gocrond_task_run_count |
Counter for each executed task |
gocrond_task_run_success |
Last status (0=failed, 1=success) for each task |
gocrond_task_run_time |
Last exec time (unix timestamp) for each task |
gocrond_task_run_duration |
Duration of last exec |
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].