A tool for running command chains
Project description
runchain
Manage and execute chains of scripts.
Runchain allows you to group scripts into named chains, schedule them with cron, and run them in a predictable order. Perfect for backup scripts and maintenance tasks.
- Group scripts into ordered chains
- Schedule chains with crondir integration
- Simple Python API and CLI interface
Usage
Install runchain:
pip install runchain
Create a backup chain by adding scripts:
runchain add backup ~/scripts/database-backup.sh 10
runchain add backup /usr/local/bin/file-backup.py 20-files
runchain add backup ./30-cleanup.sh
List your chains:
runchain list
List scripts in a specific chain:
runchain list backup
Run a chain manually:
runchain run backup
Schedule a chain with crondir:
runchain cron backup "0 2 * * *"
Remove a script or entire chain:
runchain remove backup 20-files
runchain remove backup
Or you may find it easier to skip the install step and run it using uv:
uvx runchain add backup ~/scripts/backup.sh 10
uvx runchain cron backup "0 2 * * *"
uvx runchain run backup
By default, runchain stores chains in ~/.runchain/, with each chain in its own subdirectory.
For full command line options, see command documentation
Example
For an example of setting up a backup chain, see How to create a backup chain in the documentation.
Python API
from runchain import Chain, list_chains
# List all chains
chains = list_chains()
# Work with a specific chain
backup = Chain("backup")
backup.add("~/scripts/database.sh", "10")
backup.cron("0 2 * * *")
backup.run()
See the API documentation for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file runchain-0.2.0.tar.gz.
File metadata
- Download URL: runchain-0.2.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0840c43a60e71f25f3034007ccd15182687e76361556cf4b440f2ac5d2783fea
|
|
| MD5 |
5c7e14816d236a73234bb009a805a3ca
|
|
| BLAKE2b-256 |
45a1e66c4fa660989f798781004d8bc60012637c248221342afe41979ff6a34b
|
Provenance
The following attestation bundles were made for runchain-0.2.0.tar.gz:
Publisher:
pypi.yml on radiac/runchain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runchain-0.2.0.tar.gz -
Subject digest:
0840c43a60e71f25f3034007ccd15182687e76361556cf4b440f2ac5d2783fea - Sigstore transparency entry: 471694713
- Sigstore integration time:
-
Permalink:
radiac/runchain@3268fd2027ca090d30a0d484dd20bc5910b070d9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/radiac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@3268fd2027ca090d30a0d484dd20bc5910b070d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file runchain-0.2.0-py3-none-any.whl.
File metadata
- Download URL: runchain-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccf7708ec3db0e641366fb9e09f06daaf2451fbf1bd27c1bb68a4cb11e4099c2
|
|
| MD5 |
1c167dfb06d309d0ceb77bf5bd4d2456
|
|
| BLAKE2b-256 |
228389755af6ae0b606355e2a4fb7a7dca83c82f090248422886e72169a0d291
|
Provenance
The following attestation bundles were made for runchain-0.2.0-py3-none-any.whl:
Publisher:
pypi.yml on radiac/runchain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runchain-0.2.0-py3-none-any.whl -
Subject digest:
ccf7708ec3db0e641366fb9e09f06daaf2451fbf1bd27c1bb68a4cb11e4099c2 - Sigstore transparency entry: 471694768
- Sigstore integration time:
-
Permalink:
radiac/runchain@3268fd2027ca090d30a0d484dd20bc5910b070d9 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/radiac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@3268fd2027ca090d30a0d484dd20bc5910b070d9 -
Trigger Event:
push
-
Statement type: