Python Cron Expression
Introduction
Introducing PyCronExpression – a user-friendly Python library for crafting Cron job expressions effortlessly.
With this tool, users can create Cron job expressions by simply passing a timestamp or datetime object.
Say goodbye to the complexities of writing Cron expressions
and embrace a more convenient way to manage scheduled tasks on Linux or AWS platforms.
Quickstart
Installation
Install from pypi:
pip install PyCronExpression
Feature List
| Name | status |
|---|---|
| Timestamp or datetime object | done |
| Minute | done |
| Hourly | done |
| Daily | Done |
| Weekly | done |
Example
Timestamp or datetime object
from datetime import datetime
from py_cron_expression import CronJobExpression
cron_job = CronJobExpression()
timestamp = int(datetime.now().timestamp())
res = cron_job.cron_expression(time=timestamp)
print(res)
# Output
# 10 55 13 2 5 ? 2020
# If you want to remove second from in your cron job expression.
# Then you need to add cancel='second'
# example
cron_job.cron_expression(time=timestamp, cancel='second')
# Output
# 55 13 2 5 ? 2020
To learn more Documentation.
Changelog
See Changelog
License
MIT
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog. This project adheres to Semantic Versioning.
1.0.1 - 2023-10-28
Update
- Update docs
1.0.0 - 2023-10-28
Add
- Add weekly expression
0.1.0 - 2020-05-28
Fixed
- Tuple comprehension in validations
0.1.1 - 2020-05-28
Fixed
- Fixed broken coverage svg
Metadata
Release files for PyCronExpression 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyCronExpression-1.0.1.tar.gz | 6.7 kB | Without provenance | Details for PyCronExpression-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| PyCronExpression-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for PyCronExpression-1.0.1-py3-none-any.whl |
Total release size: 16.3 kB
Release files / PyCronExpression-1.0.1.tar.gz
| Download URL | PyCronExpression-1.0.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da2b8fc0e7e3cc3202df991b1d9d6fd410f071c93315e72663455935839969e2
|
|
BLAKE2b-256 checksum How to use checksums |
6a014f858d66cddfb4f0351c744fafe232e44c624558f2179e50207ccae1fadc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / PyCronExpression-1.0.1-py3-none-any.whl
| Download URL | PyCronExpression-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40c44a8dcbbf890adacc2680c14abc715915da1a41faa963912994861268387c
|
|
BLAKE2b-256 checksum How to use checksums |
58641047dca1a1e9ae4a2f0128a95428d4b7c0b178736af6126f76cef724ea25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for PyCronExpression 1.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.