pytocron is a cron implementation targeting containers, written in Python, with seconds and year resolution, native support for Healthchecks.io and >90% test coverage. It is licensed under GNU Affero General Public License v3.0 or later and is meant to remain simple and maintainable.
One particular prime use case is to feed uptime monitoring. For example, here is how I monitor availability of my blog:
# Check blog availability every 30 seconds
# hc-ping: https://hc-ping.com/00000000-0000-0000-0000-000000000000
*/30 * * * * * * wget -qO- -T2 https://blog.hartwork.org/ | grep -qF 'Hartwork Blog'Regarding name "pytocron": It was inspired by the term pytosquatting and it had no search results on Google.
If you like pytocron, please support it with a star!
# pip3 install pytocronor
# pipx install pytocron| pytocron | Supercronic | Vixie Cron | |
|---|---|---|---|
| Written in | Python | Go | C |
| Container support | |||
| ∟ Targets | containers | containers | non-container systems |
| ∟ Environment variables | kept | kept | ? |
| ∟ Multi-user mode | ✘ | ✘ | ✔ |
| ∟ Logging target | stdout, stderr | stdout, stderr | syslog or log file |
| ∟ Log rotation support | ✘ | ✔ | ✔ |
| ∟ Command shell | bash -e -u |
/bin/sh |
/bin/sh |
| ∟ Daemonization | ✘ | ✘ | ✔ |
| ∟ Crontab reloading | ✘ | ✔ | ✔ |
| Integrations | |||
| ∟ Support for Healthchecks.io | ✔ | ✘ | ✘ |
| ∟ Support for Sentry | ✔ | ✔ | ✘ |
| Crontab syntax | |||
| ∟ Seconds and year resolution | ✔ (forced) | ✔ (optional) | ✘ |
| ∟ Implementation | croniter | cronexpr | custom |
| Exceeded job runtime handling | auto-kill | overlapping or skips | ? |
| Handling of daylight saving time | ? | ? | ? |
| Signal handling | |||
∟ SIGHUP |
shutdown | shutdown | log file reopen |
∟ SIGUSR2 |
shutdown | crontab file reload | shutdown |
Prior to opening pull requests, please create an issue to discuss the matter first. Thank you!
If you believ to have found a security issue within pytocron, please reach out via e-mail. Thank you!
Please report any bugs that you find.
Like this tool? Support it with a star!