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 # (Optional) IANA tz database; It uses UTC when not specify description: In the description, you *can* use `markdown` labels: - basic label - text: colored label color: yellow
All
*.yaml
files would be loaded on initialization time. We could use scripts to pull the defines from other places before flask started.Following colors are available for labels:
red
,orange
,yellow
,green
,teal
,cyan
,blue
,purple
,pink
,black
andwhite
-
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.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f8a11dcebc7633d96cb5f4e8057cb6b4ccf02ee982cb0b7775418da5b57bd5d |
|
MD5 | ac18681f0d7d24c82ca83431af76c45b |
|
BLAKE2b-256 | 57fde214c31004f2f2e79bf0cf47899f67662150ccdfee774fa79419b12648bb |