asparagus

command module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2018 License: MIT Imports: 11 Imported by: 0

README

Asparagus

CircleCI Maintainability Test Coverage

A simple and pluggable cron scheduler for distributed systems.

Asparagus is an open source task scheduler with no external dependencies. It's useful for executing scheduled tasks on any environment.

Features

  • Variety of Source Providers, ranging from standard crontab to etcd based backends.
  • Multiple Execution Providers, including HTTP and local execution.
  • Simple to install and manage, and easy to get started.
  • Monitoring and reporting is a key priority.
  • Retry and Backoff strategies.

Installation

We recommend using Asparagus with our pre-built Docker image. Start Asparagus using:

# Crontab Backend
docker pull fkconsultin/asparagus

docker run \
  --rm -ti \
  -v $(pwd)/example:/app \
  -e ASPARAGUS_SCHEDULER_PROVIDER_CRONTAB_SOURCE=/app/crontab \
  fkconsultin/asparagus

How it works

  -------------------                                         ----------------------
  | Source Provider | \                                     / | Execution Provider |
  -------------------  \                                   /  ----------------------
                        > - - - Asparagus Scheduler - - - <
  -------------------  /                |                  \  ----------------------
  | Source Provider | /                 |                   \ | Execution Provider |
  -------------------                   |                     ----------------------
                                ---------------------
                                | Metrics Reporting |
                                ---------------------

Source Providers provide configuration and crontab settings to asparagus. Asparagus uses the configured Execution Provider to execute the actual cronjob on the target system.

Configuration

Global configuration

Configuration is done using environment variables or a central config file. You can generate a sample configuration file by using the following command:

docker run --rm -ti fkconsultin/asparagus config > conf/asparagus.conf

Now you can start your asparagus instance using the provided volume: /etc/asparagus using the asparagus.conf filename:

docker run --rm -ti -v $(pwd)/conf:/etc/asparagus fkconsultin/asparagus

Alternatively you can use prefixed environment variables for each configuration variable, like so:

ASPARAGUS_<SECTION>_<KEY>=<VALUE>

Read the annotated documentation if you want to find out more: here

Source Providers

Source providers define where cronjobs can be discovered. To find out more read this article.

Execution Providers

Execution providers execute whatever was defined inside a cronjob. To find out more read this article.

Contributing

If you're feeling adventurous and want to contribute to Aspragus, see our contributing doc for info on how to make feature requests, build from source, and run tests.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package toml adds support to marshal and unmarshal types not in the official TOML spec.
Package toml adds support to marshal and unmarshal types not in the official TOML spec.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL