scheduler
A simple job scheduler with cron expression
Inspired by “schedule”.
Usage
$ pip3 install scheduler-cron
import scheduler
def test_1():
print('test1')
def test_2(name):
print('test2: ' + name)
def test_3(name, lname):
print('test3: ' + name + ' ' + lname)
scheduler = Scheduler(60)
scheduler.add('foo', '* * * * *', test_1)
scheduler.add('bar', '0/2 * * * *', test_2, ('mehrdad',))
scheduler.add('bas', '0/3 * * * *', test_3, ('behzad', 'mahmoudi'))
scheduler.add('zoo', '0/4 * * * *', test_3, ('reza', 'mahmoudi'))
scheduler.start()
ToDo
Run jobs in async mode
sleep for more than interval seconds if there is no jobs for next run
Meta
Mehrdad Mahmoudi - @mehrdadmhd - mehrdadmhd@gmail.com
Metadata
Release files for scheduler-cron 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 |
|---|---|---|---|---|
| scheduler-cron-0.1.tar.gz | 2.2 kB | Without provenance | Details for scheduler-cron-0.1.tar.gz |
Release files / scheduler-cron-0.1.tar.gz
| Download URL | scheduler-cron-0.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea6307fdbc3cd47ae489a544aa834d53f0fa001eae6de416b95ffd4f2f265f77
|
|
BLAKE2b-256 checksum How to use checksums |
2db0d23c370be8de10f3b14f003a67a0cb447a84ff8ef083660d612529ec5e89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5
|
Security for scheduler-cron 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.