All Projects → cenkalti → Dalga

cenkalti / Dalga

Licence: mit
⏰ MySQL backed Job Scheduler with a HTTP interface

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Dalga

Node Job Queue
Implementation of a nested asynchronous job queue in Node.js
Stars: ✭ 56 (-75.65%)
Mutual labels:  job-scheduler
Clockwerk
Job Scheduling Library
Stars: ✭ 104 (-54.78%)
Mutual labels:  job-scheduler
Factotum
A system to programmatically run data pipelines
Stars: ✭ 158 (-31.3%)
Mutual labels:  job-scheduler
F3 Cron
Job scheduling for the PHP Fat-Free Framework
Stars: ✭ 65 (-71.74%)
Mutual labels:  job-scheduler
Sleepto
An alternative to traditional task schedulers
Stars: ✭ 98 (-57.39%)
Mutual labels:  job-scheduler
Workq
Job server in Go
Stars: ✭ 1,546 (+572.17%)
Mutual labels:  job-scheduler
Jiacrontab
简单可信赖的任务管理工具
Stars: ✭ 1,052 (+357.39%)
Mutual labels:  job-scheduler
Bee Queue
A simple, fast, robust job/task queue for Node.js, backed by Redis.
Stars: ✭ 2,685 (+1067.39%)
Mutual labels:  job-scheduler
Foundatio
Pluggable foundation blocks for building distributed apps.
Stars: ✭ 1,365 (+493.48%)
Mutual labels:  job-scheduler
Cylc Flow
Cylc: a workflow engine for cycling systems. Repository master branch: core meta-scheduler component of cylc-8 (in development); Repository 7.8.x branch: full cylc-7 system.
Stars: ✭ 154 (-33.04%)
Mutual labels:  job-scheduler
Ppgo job
PPGo_Job是一款可视化的、多人多权限的、一任务多机执行的定时任务管理系统,采用golang开发,安装方便,资源消耗少,支持大并发,可同时管理多台服务器上的定时任务。
Stars: ✭ 1,152 (+400.87%)
Mutual labels:  job-scheduler
Artifex
Simple in-memory job queue for Golang using worker-based dispatching
Stars: ✭ 98 (-57.39%)
Mutual labels:  job-scheduler
Fiber Job System
Multi-Threaded Job System using Fibers
Stars: ✭ 121 (-47.39%)
Mutual labels:  job-scheduler
Dotnetworkqueue
A work queue for dot.net with SQL server, SQLite, Redis and PostGreSQL backends
Stars: ✭ 58 (-74.78%)
Mutual labels:  job-scheduler
Neph
A modern command line job processor, similar with make command
Stars: ✭ 174 (-24.35%)
Mutual labels:  job-scheduler
Batchman
This library for Android will take any set of events and batch them up before sending it to the server. It also supports persisting the events on disk so that no event gets lost because of an app crash. Typically used for developing any in-house analytics sdk where you have to make a single api call to push events to the server but you want to optimize the calls so that the api call happens only once per x events, or say once per x minutes. It also supports exponential backoff in case of network failures
Stars: ✭ 50 (-78.26%)
Mutual labels:  job-scheduler
Go Quartz
Simple, zero-dependency scheduling library for Go
Stars: ✭ 118 (-48.7%)
Mutual labels:  job-scheduler
Cronsun
A Distributed, Fault-Tolerant Cron-Style Job System.
Stars: ✭ 2,493 (+983.91%)
Mutual labels:  job-scheduler
Hellodaemon
Android 服务保活/常驻 (Android service daemon using JobScheduler)
Stars: ✭ 2,183 (+849.13%)
Mutual labels:  job-scheduler
Vertx Kue
Vert.x Blueprint Project - Vert.x Kue, a priority task queue powered by Vert.x
Stars: ✭ 126 (-45.22%)
Mutual labels:  job-scheduler

Dalga

Dalga is a job scheduler. It's like cron-as-a-service.

  • Can schedule periodic or one-off jobs.
  • Stores jobs in a MySQL table with location info.
  • Has an HTTP interface for scheduling and cancelling jobs.
  • Makes a POST request to the endpoint defined in config on the job's execution time.
  • Retries failed jobs with constant or exponential backoff.
  • Multiple instances can be run for high availability and scaling out.

Install

Use pre-built Docker image:

$ docker run -e DALGA_MYSQL_HOST=mysql.example.com cenkalti/dalga

or download the latest binary from releases page.

Usage

See example config file for configuration options. TOML and YAML file formats are supported. Configuration values can also be set via environment variables with DALGA_ prefix.

First, you must create the table for storing jobs:

$ dalga -config dalga.toml -create-tables

Then, run the server:

$ dalga -config dalga.toml

Schedule a new job to run every 60 seconds:

$ curl -i -X PUT 'http://127.0.0.1:34006/jobs/check_feed/1234?interval=60'
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Date: Tue, 11 Nov 2014 22:10:40 GMT
Content-Length: 83

{"path":"check_feed","body":"1234","interval":60,"next_run":"2014-11-11T22:11:40Z"}

PUT always returns 201. If there is an existing job with path and body, it will be rescheduled.

There are 4 options that you can pass to Schedule but not every combination is valid:

Param Description Type Example
interval Run job at intervals Integer or ISO 8601 interval 60 or PT60S
first-run Do not run job until this time RFC3339 Timestamp 1985-04-12T23:20:50.52Z
one-off Run job only once Boolean true, false, 1, 0
immediate Run job immediately as it is scheduled Boolean true, false, 1, 0

60 seconds later, Dalga makes a POST to your endpoint defined in config:

Path: <config.baseurl>/<job.path>
Body: <job.body>

The endpoint must return 200 if the job is successful.

The endpoint may return 204 if job is invalid. In this case Dalga will remove the job from the table.

Anything other than 200 or 204 makes Dalga to retry the job indefinitely with an exponential backoff.

Get the status of a job:

$ curl -i -X GET 'http://127.0.0.1:34006/jobs/check_feed/1234'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Tue, 11 Nov 2014 22:12:21 GMT
Content-Length: 83

{"path":"check_feed","body":"1234","interval":60,"next_run":"2014-11-11T22:12:41Z"}

GET may return 404 if job is not found.

Cancel previously scheduled job:

$ curl -i -X DELETE 'http://127.0.0.1:34006/jobs/check_feed/1234'
HTTP/1.1 204 No Content
Date: Tue, 11 Nov 2014 22:13:35 GMT
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].