https://github.com/ess/cronenberg
It's like cron, but kinda twisted
https://github.com/ess/cronenberg
12-factor cron go golang userland
Last synced: about 1 year ago
JSON representation
It's like cron, but kinda twisted
- Host: GitHub
- URL: https://github.com/ess/cronenberg
- Owner: ess
- License: apache-2.0
- Created: 2019-02-20T21:00:32.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2019-02-22T10:21:24.000Z (over 7 years ago)
- Last Synced: 2025-04-19T20:16:59.879Z (about 1 year ago)
- Topics: 12-factor, cron, go, golang, userland
- Language: Go
- Size: 1.32 MB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cronenberg #
[](https://travis-ci.org/ess/cronenberg)
[](https://goreportcard.com/report/github.com/ess/cronenberg)
[](http://godoc.org/github.com/ess/cronenberg)
It's like cron, but kinda twisted.
## Installation ##
You can either download the appropriate release from the [releases page](https://github.com/ess/cronenberg/releases) or install via `go get`:
```
go get -u github.com/ess/cronenberg/cmd/cronenberg
```
## Basics ##
Cronenberg works similarly to the standard `cron` that you already know and love, but with a few differences:
* It is not meant to be run as a system service
* It does not use a traditional crontab
* Jobs for a given `cronenberg` instance are loaded from a YAML file
* It supports locking jobs (jobs that can only ever have one running instance)
* It logs to STDOUT
* It supports both incoming (from the system) and job-scoped environment variables
In short, this is the `cron` implementation that you run along side your 12-factor application.
### Jobs File ###
There is not a hard-coded location for your jobs file. Instead, you pass the jobs file as the first argument to the `cronenberg` command like so:
```
cronenberg /path/to/my/jobs/file.yml
```
This is just a YAML file containing an array of Job objects. Here's an example jobs file:
```yaml
# Job objects require a name, a command, and a schedule (when). You can also
# specify a description, whether or not the job locks, and a hash of environment
# variables for the job.
# This is just a normal job that runs every minute
- name: what-am-i
command: echo "I am a command"
when: "* * * * *"
# This is a locking job that is scheduled to run every minute so long as there
# is not already an instance of the job in progress.
- name: picky-picky
command: 'echo "I am a picky command" ; sleep 70'
when: "* * * * *"
lock: true
# This is a job that runs every five minutes and specifies an environment
# variable. If this variable is also set in cronenberg's executing shell, the
# value configured here takes precedence.
- name: know-your-environment
command: echo $flibberty
when: "*/5 * * * *"
env:
flibberty: gibbets
```
## History ##
* v1.0.0 - Initial Release