Another YAML-based scheduler
Project description
Cronico
Cronico is a lightweight, YAML-based task scheduler for Unix-like systems.
It lets you define recurring jobs with flexible cron expressions — supporting traditional minute-based syntax, extended formats with seconds, and common shorthand aliases (@daily, @hourly, etc.).
Tasks can include:
- Retry policies with configurable attempts.
- Timeouts to kill long-running processes.
- Environment injection from .env files or inline variables.
- Working directory control per task.
- Streaming or buffered logs for stdout/stderr.
Cronico is designed to run as a long-lived daemon (via systemd or similar) and can reload its configuration on SIGHUP without restarting the process.
tasks:
example_task:
description: |
Classic cron expression: every 5 minutes
cron: "*/5 * * * *"
command: "echo 'Hello, World!'"
retry_on_error: true
max_attempts: 3
env_file: ".env"
timeout: 60 # seconds
working_dir: "/path/to/dir"
environment:
MY_VAR: "value"
custom_env:
cron: "*/5 * * * *"
environment:
GREETING: "Hola"
command: |
echo "$GREETING from Bash at $(date)"
every_minute_at_second_10:
description: |
Extended with seconds: every minute, at the 10th second
cron:
minute: "*"
hour: "*"
day: "*"
month: "*"
weekday: "*"
second: 10
command: "echo 'Run at second 10 of every minute'"
every_30_seconds:
description: |
Classic with seconds: every 30 seconds
cron: "*/1 * * * * 0,30"
command: "echo 'This runs at second 0 and 30 of each minute'"
daily_with_seconds:
description: |
Daily at 03:00:15
cron:
minute: 0
hour: 3
day: "*"
month: "*"
weekday: "*"
second: 15
command: "echo 'Daily at 03:00:15'"
shorthand:
description: |
Shorthand: daily, at 00:00
cron: "@daily"
command: |
echo "Supported aliases:"
echo "- @yearly: 0 0 1 1 *"
echo "- @annually: 0 0 1 1 *"
echo "- @monthly: 0 0 1 * *"
echo "- @weekly: 0 0 * * 0"
echo "- @daily: 0 0 * * *"
echo "- @midnight: 0 0 * * *"
echo "- @hourly: 0 * * * *"
with_shebang:
description: |
You can use a shebang to specify the interpreter to use.
cron: "*/10 * * * *"
command: |
#!/usr/bin/env python3
import datetime
print("Hello from Python at", datetime.datetime.now())
another_shebang_example:
description: |
Another one...
cron: "*/10 * * * *"
command: |
#!/usr/bin/env perl
use strict;
use warnings;
my ($sec,$min,$hour) = localtime();
print "Hello from Perl at $hour:$min:$sec\n";
and_another_shebang_example:
description: |
I think you get the idea.
cron: "*/10 * * * *"
command: |
#!/usr/bin/env perl
use strict;
use warnings;
my ($sec,$min,$hour) = localtime();
print "Hello from Perl at $hour:$min:$sec\n";
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 cronico-0.9.17.tar.gz.
File metadata
- Download URL: cronico-0.9.17.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
280902a8081083ad448f8c734f9eeb8a62b82a30b12c6f26335c72e3e4ac6d5c
|
|
| MD5 |
b3b5aac7d21d4bfac8311cdd9c5e9255
|
|
| BLAKE2b-256 |
71a4c01c0a008cd8184f82d496f4f494fd246a62f5c21aa45728fc521c3cb1c2
|
File details
Details for the file cronico-0.9.17-py3-none-any.whl.
File metadata
- Download URL: cronico-0.9.17-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d4b5976e43e469d9e21eb1e5df34525057847f77e9abc1c2493b60f66d18ffd
|
|
| MD5 |
29fba047a20efd4e61be101f54348fd4
|
|
| BLAKE2b-256 |
a9f1aaae419c0480ab78b1fb2ab29bd02c666df9ed14e48f457c16bb800eb49c
|