Show schdueled jobs in a more readable way
Project description
Timetable for cronjobs
Show schdueled jobs in a more readable way.
features
- Easy configure - Setup job list in YAML format
- Timezone supported - Able to configure server timezone and show the time in local time
- Quick filtering - Allow customized label and quick lookup
Usage
-
Install
# basic pip install cron-times # with extra features pip install 'cron-times[cli]'
-
Create task definition files
Task definition are YAML files placed under
tasks/
folder in current working directory.An example task:
- name: task name schedule: "0 10 * * *" timezone: Asia/Taipei # tzdata format; Would use UTC if not provided description: In the description, you *can* use `markdown` labels: - sample-label - another-label
All
*.yaml
files would be loaded on initialization time. We could use scripts to pull the defines from other places before flask started. -
Run the app for testing
flask --app cron_times run
Built-in providers
This tool comes with few builtin providers. The providers read cronjobs from the following places and build into task definition file:
crontab
: Read crontab on local machinedbt
: Query scheduled jobs from dbt cloud. API triggered and manually triggered jobs are discarded.
To use the provider, you MUST install cron-times
with [cli]
option.
cron-times get-tasks <source> --help
We could run these providers before starting the app to refresh the definition files.
Deploy
Flask suggests to use a WSGI server for production.
You can run the WSGI server app and call the module cron_times:app
for such usage.
Take gunicorn as an example:
gunicorn --bind 0.0.0.0:8000 --workers 2 cron_times:app
Note
This app does not reload task definition after it started. You should restart the app in case task definition is changed.
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
Hashes for cron_times-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02f04a11945566f061b0aeb0b74a1f727ba3719f1544d1fa328539ee3cd912e2 |
|
MD5 | 6fe6a210a364d45f80716dec6274b422 |
|
BLAKE2b-256 | b5a76ae2ce195502ea8fcc3cd509cd5d4306f39abb2c12474eed8dcf0a8cccb2 |