Introduction
Motivation
Warning
This project is currently considered as "alpha" release.
Configuration, API and operations may change and code coverage will improve.
Installation
Currently only installation via GitHub is possible:
pip install git+https://github.com/georgepsarakis/chronicle.git
Starting from the beta release, a PyPI package will be available.
Features
Configurable Timeout
Maximum Concurrency
Task Weight
Task weights can be used to determine each job's contribution to the total concurrency. This is useful for differentiating between I/O-heavy jobs and CPU-bound jobs.
Backfill
In case of maintenance operations or during a deployment, the scheduled jobs should stop running. Also, when new scheduled jobs are added there might be a need to execute the schedule for a short period in the past.
Chronicle allows the schedule clock to be set in the past, simply by passing a timestamp when starting the server.
Pause / Resume
Requires use of the Redis backend.
Executions can be paused for a given interval, or a date/time in the future. Resuming manually is also possible.
While on pause, the scheduler clock continues to advance and already running jobs are not cancelled.
More fine grained control over which jobs will be paused is given by providing a regular expression that will match the commands or the job hash(es), which are generated by Chronicle and uniquely identify jobs.
Crontab Format Export
The interval, environment variables and the command can be exported in crontab-compatible format. The output is useful for inspection or for migrating/deploying to a crontab-based system.
Chronicle-specific additional metadata will also appear as comments.
Status Checks
Callbacks
Comments
Chronicle allows for providing more structured annotations for each job.
Metrics & Reporting
STDOUT/STDERR Capturing
Environment Variables
Environment Providers
Chronicle Context
Available Variables
Environment Filtering
Duplicate Command Handling
When a job execution time exceeds its interval, processes may start piling up, requiring more resources to complete and effectively bring execution to a halt. In addition, the increased resource consumption (e.g. database queries), may start causing issues to other components of the stack, for example a web application server.
Skip Strategy
It is possible that the same command is configured at different intervals or its execution time may extend over the given interval.
Chronicle ensures that only a single instance of a command is running at any given time.