All Projects → nicomt → ckron

nicomt / ckron

Licence: ISC license
🐋 A cron-like job scheduler for docker

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to ckron

time.clj
time util for Clojure(Script)
Stars: ✭ 45 (+21.62%)
Mutual labels:  cron, scheduler, cronjob
nodejs-cron-job-must-know
it is an example of running node.js script with every certain period(cron job)
Stars: ✭ 35 (-5.41%)
Mutual labels:  cron, scheduler, cronjob
gronx
Lightweight, fast and dependency-free Cron expression parser (due checker), task scheduler and/or daemon for Golang (tested on v1.13 and above) and standalone usage
Stars: ✭ 206 (+456.76%)
Mutual labels:  scheduler, cronjob
Powerjob
Enterprise job scheduling middleware with distributed computing ability.
Stars: ✭ 3,231 (+8632.43%)
Mutual labels:  cron, scheduler
jobor
支持秒级分布式定时任务系统, A high performance distributed task scheduling system, Support multi protocol scheduling tasks
Stars: ✭ 52 (+40.54%)
Mutual labels:  cron, cronjob
Minicron
🕰️ Monitor your cron jobs
Stars: ✭ 2,351 (+6254.05%)
Mutual labels:  cron, scheduler
Sundial
A Light-weight Job Scheduling Framework
Stars: ✭ 230 (+521.62%)
Mutual labels:  cron, scheduler
thain
Thain is a distributed flow schedule platform.
Stars: ✭ 81 (+118.92%)
Mutual labels:  cron, scheduler
Heliocron
A command line application written in Rust capable of delaying execution of other programs for time periods relative to sunrise and sunset.
Stars: ✭ 152 (+310.81%)
Mutual labels:  cron, scheduler
croner
Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.
Stars: ✭ 169 (+356.76%)
Mutual labels:  cron, scheduler
hubot-schedule
A hubot script to schedule a message in both cron-style and datetime-based format pattern
Stars: ✭ 46 (+24.32%)
Mutual labels:  cron, scheduler
Crython
Lightweight task scheduler using cron expressions
Stars: ✭ 197 (+432.43%)
Mutual labels:  cron, scheduler
Rufus Scheduler
scheduler for Ruby (at, in, cron and every jobs)
Stars: ✭ 2,223 (+5908.11%)
Mutual labels:  cron, scheduler
Laravel Cronless Schedule
Run the Laravel scheduler without relying on cron
Stars: ✭ 231 (+524.32%)
Mutual labels:  cron, scheduler
Scheduler
Task scheduler for Golang
Stars: ✭ 171 (+362.16%)
Mutual labels:  cron, scheduler
Shardingsphere Elasticjob Cloud
Stars: ✭ 248 (+570.27%)
Mutual labels:  cron, scheduler
Automation-using-Shell-Scripts
Development Automation using Shell Scripting.
Stars: ✭ 41 (+10.81%)
Mutual labels:  cron, scheduler
Simple scheduler
An enhancement for Heroku Scheduler + Sidekiq for scheduling jobs at specific times.
Stars: ✭ 127 (+243.24%)
Mutual labels:  cron, scheduler
Quantum Core
⌚ Cron-like job scheduler for Elixir
Stars: ✭ 1,905 (+5048.65%)
Mutual labels:  cron, scheduler
EasyCronJob
This repository provides easy cron job to your application on IHostedService.
Stars: ✭ 66 (+78.38%)
Mutual labels:  cron, cronjob

ckron

A cron-style job scheduler for docker

NPM Version Test Docker Image Size

ckron is a versatile and straightforward tool to schedule operations on containerized applications.

ckron is heavily inspired by ofelia but attempts to improve on it by allowing multiple tasks per job. Using tasks, you can compose complex workflows with a few off-the-shelf images and follow Docker's motto of one process per container.

Install

If you have Node installed:

$ npm i -g ckron

If you only have Docker installed:

$ docker pull nicomt/ckron

Usage

If you installed it in Node:

$ ckron daemon --config /path/to/config.yml

If you installed it in Docker:

$ docker run --rm -it \
      -v $PWD/config.yml:/etc/ckron/config.yml \
      -v /var/run/docker.sock:/var/run/docker.sock \
      nicomt/ckron daemon

NOTE: For production is recommended to use docker with a restart policy or create a service in something like systemd, upstart or forever. A service will ensure the daemon is restarted in case of an unexpected failure

Configuration

The configuration consists of a YAML file, which is meant to have familiar docker compose like syntax. The main sections of the config file are the following:

Tasks

Single operations that can be carried out by a job. Tasks currently supported are:

  • run: Runs a command inside of a new container, using a specific image.
  • exec: Runs a new command in a running container
  • signal: Send a signal to the main process inside the container. Similar to docker kill --signal

See tasks reference for more documentation

Jobs

Jobs are sets of tasks scheduled with a cron-like syntax. See jobs reference for more documentation

Notifiers

Notification channels for failed jobs. See notifiers reference for more documentation

YAML Full Example

Run with $ ckron daemon --config /path/to/config.yml

tasks:
  test-01:
    type: run
    command: printenv
    environment:
      HELLO: World
    image: ubuntu:latest
jobs:
  job-01:
    schedule: "*/30 * * * * *"
    on_error: ["email-dev"]
    run_on_init: true
    tasks:
      - test-01
notifiers:
  email-dev:
    type: email
    smtp_host: smtp.server.com
    smtp_port: 25
    smtp_auth:
      user: XXXXXXX
      pass: XXXXXXX
    to: [email protected]
    from: '"Ckron Scheduler" <[email protected]>'
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].