Skip to main content

pre-commit Run the test suite

pytocron

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!

Installation

# pip3 install pytocron

or

# pipx install pytocron

Comparison with other crons

  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 skips, duplicates ? ?
Reaction to NTP adjustments none ? ?
Signal handling      
∟ SIGHUP shutdown shutdown log file reopen
∟ SIGUSR2 shutdown crontab file reload shutdown

Contributing

Prior to opening pull requests, please create an issue to discuss the matter first. Thank you!

Security

If you believe to have found a security issue within pytocron, please reach out via e-mail. Thank you!

Support

Please report any bugs that you find.

Like this tool? Support it with a star!

Metadata

Release files for pytocron 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytocron 2.0.0
File Size Uploaded
pytocron-2.0.0.tar.gz 23.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytocron 2.0.0
File Interpreter ABI Platform
pytocron-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.6 kB

Release files / pytocron-2.0.0.tar.gz

Download URL pytocron-2.0.0.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
eca41a5e12791902fb7a61ad4ebfc999357026746c5fef18f7b17f0c82787c74
BLAKE2b-256 checksum
How to use checksums
96d77756616d34480b88aea2062a9357718cd184d636ce7465e3fa7d73ae57e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / pytocron-2.0.0-py3-none-any.whl

Download URL pytocron-2.0.0-py3-none-any.whl
Size 28.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
691b6d1c8608da802c012cb2079d7d6209d3ca8de4c792f88dab2f8d766da917
BLAKE2b-256 checksum
How to use checksums
78565751207a21f1bb383b9a937f575660e2d5776650da908ab3ba0ec812287e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page