Crontable
A lightweight Python scheduler that unifies two task types in a single loop:
- DateTask — one-shot tasks triggered at a specific datetime, loaded from a semicolon-delimited CSV file
- CronTask — repeating tasks driven by standard 5-field cron expressions (or friendly
@aliases), loaded from a crontab-style text file
Comes with a CLI entry-point and an optional tkinter GUI (crontable-gui).
Installation
pip install crontable
Requires Python ≥ 3.10. The only runtime dependency is croniter.
Quick start
Programmatic usage
from datetime import datetime, timedelta
from crontable import Scheduler, SubprocessExecutor, DateTask, CronTask
executor = SubprocessExecutor()
scheduler = Scheduler(executor=executor, interval=30.0)
scheduler.add_tasks([
DateTask(
scheduled_at=datetime.now() + timedelta(minutes=5),
action="echo 'hello in 5 minutes'",
name="greeting",
),
CronTask(
cron_expr="0 9 * * 1-5",
action="python C:/scripts/daily_report.py",
name="weekday_report",
),
])
try:
scheduler.run()
except KeyboardInterrupt:
scheduler.stop()
From a CSV file
DATE;NAME;COMMAND
01/01/2027 09:00;morning_report;echo "Good morning"
15/06/2027 14:30;backup;python C:\scripts\backup.py
from crontable import FileSource, Scheduler, SubprocessExecutor
source = FileSource("tasks.csv")
scheduler = Scheduler(executor=SubprocessExecutor(), interval=60.0)
scheduler.add_tasks(source.load())
scheduler.run()
From a crontab file
# Every weekday at 9 am
0 9 * * 1-5 python C:\scripts\report.py
# French alias — every Monday at midnight
@lundi echo "Bonne semaine"
from crontable import FileSource, Scheduler, SubprocessExecutor
source = FileSource("jobs.txt")
scheduler = Scheduler(executor=SubprocessExecutor(), interval=60.0)
scheduler.add_tasks(source.load())
scheduler.run()
Hot-reload on file change
Pass the source to the scheduler and set reload_on_change=True. Every tick,
the scheduler checks source.has_changed() and atomically swaps in
source.load() when the file is touched. A failing parse (half-saved edit,
invalid syntax) is logged and the previous task list is kept.
source = FileSource("jobs.txt")
scheduler = Scheduler(
executor=SubprocessExecutor(),
interval=5.0,
source=source,
reload_on_change=True,
)
scheduler.add_tasks(source.load())
scheduler.run()
See examples/ for more runnable patterns.
CLI
# Programmatic demo
crontable
# Load from file (auto-detects CSV vs crontab by extension)
crontable tasks.csv
crontable crontab.txt
GUI
crontable-gui
Features: file browser, configurable polling interval, live task list with right-click "Run now", color-coded log, hot-reload on file change, persistent config.
Build a standalone Windows .exe:
scripts\build_exe.bat
Supported cron aliases
| Alias | Expression | Alias | Expression |
|---|---|---|---|
@hourly |
0 * * * * |
@daily / @midnight |
0 0 * * * |
@weekly |
0 0 * * 0 |
@monthly |
0 0 1 * * |
@annually / @year |
0 0 1 1 * |
@noon |
0 12 * * * |
@biweekly |
0 0 * * 0,2,4 |
@bimonthly |
0 0 1,15 * * |
@mon … @sun |
weekday at midnight | @lundi … @dimanche |
French weekdays |
Path aliases in commands
| Alias | Expands to |
|---|---|
@python |
Current Python interpreter |
@home |
User home directory |
@desktop |
~/Desktop |
Development
pip install -e ".[dev]"
pytest
Metadata
Release files for crontable 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crontable-0.3.0.tar.gz | 1.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crontable-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / crontable-0.3.0.tar.gz
| Download URL | crontable-0.3.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f8d2dc28528f09b66c854dda514de31863d1f1a7438cf8f7ee3165553fdd621
|
|
BLAKE2b-256 checksum How to use checksums |
b3dfd73ad1117f2a04d8e640ee75acfa40a2a61cf8a71314441e3a497be04d5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.
Transparency logRelease files / crontable-0.3.0-py3-none-any.whl
| Download URL | crontable-0.3.0-py3-none-any.whl |
|---|---|
| Size | 33.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a31f071b80e7099154c143f8e9823aafc40cbedb527eb5127bb2e33703b9e6ef
|
|
BLAKE2b-256 checksum How to use checksums |
0522809f66f36828cf4488d662f51aff2beb91899eb35a4ae7054a7e7eb9233a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.
Transparency log