A tool to convert CRONTAB jobs to DAGU DAGs
Project description
Dagu-cron
Dagu-cron is a versatile Python package and command-line tool designed to facilitate the conversion of CRONTAB jobs into DAGU DAGs, enabling efficient management of complex workflows within a controlled application environment.
Features
-
CRONTAB to DAGU Conversion: Automatically convert CRONTAB entries to DAGU DAGs, streamlining the management and visualization of intricate workflows.
-
Workflow Management:
- Add Steps: Seamlessly integrate new steps into existing DAGs.
- Transfer Steps: Move steps between DAGs to reorganize workflows.
- Remove Steps: Simplify DAGs by removing unnecessary steps.
-
CLI and Library Integration:
- Command-Line Interface: Execute commands to perform CRONTAB conversion, step addition, transfer, and removal.
- Library Functions: Import directly into projects for deeper integration and customized workflow management.
-
Secure Application Environment: Control and manage DAG operations exclusively through the application interface, ensuring security by restricting access to the DAGU UI and server.
Usage
Command-Line Interface
Execute commands to perform tasks:
# Convert CRONTAB to DAGU DAGs
$ dagu-cron build -o /path/to/output/dags
# Add a step to an existing DAG
$ dagu-cron add_step -o /path/to/output/dags -dag dag_name -step step_name -schedule "*/5 * * * *" -command "python script.py" -dependencies "dependency1,dependency2"
# Transfer a step from one DAG to another
$ dagu-cron transfer_step -o /path/to/output/dags -source source_dag.yaml -dest dest_dag.yaml -step step_name
# Remove a step from a DAG
$ dagu-cron remove_step -o /path/to/output/dags -dag dag_name -step step_name
Library Integration Import functions for programmatic control:
from dagu_cron.lib import add_step_to_dag, build_dag_from_crontab
# Example usage in Python code
output_dir = '/path/to/output/dags'
dag_name = 'my_dag.yaml'
step_name = 'step1'
step_schedule = '*/5 * * * *'
step_command = 'python script.py'
step_dependencies = 'dependency1,dependency2'
add_step_core(output_dir, dag_name, step_name, step_schedule, step_command, step_dependencies)
build_core(output_dir)
By offering both a versatile CLI and seamless library integration, dagu-cron empowers developers to manage workflows effectively and securely, whether through direct commands or integrated functions within their projects.
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
File details
Details for the file dagu_cron-0.1.0.tar.gz
.
File metadata
- Download URL: dagu_cron-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 226fd573134a7fd2daf35ed4feea2d52cf2b80e0ad5245916e51014e6d3d8f81 |
|
MD5 | 8846bd252c3be347cfe6de86071aab1e |
|
BLAKE2b-256 | 94582e18c8aad5f98e46063974a5cec6bcf716f2bdb28c2593cc239e713fe4da |
File details
Details for the file dagu_cron-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: dagu_cron-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88e401fd575f86a8c09934e2541691f0af55628e91bff521640e4e6005ae3fc2 |
|
MD5 | d997fd4dd37afa3160de85a7a97bbe9f |
|
BLAKE2b-256 | ac7d1e108b771c9f013c00ef9ce8e775f6d515bb8e5627b199373fd8e6a33e24 |