Skip to main content

pycronjob

An easy start crontab tools
Supports 5~7 cron symbols
0/1 * * * * or 0 */2 * * * ? or 0 */3 * * * ? *

How to Use

install

pip install pycronjob

base

from pycronjob import Crontab

def p(*args):
    print(args, datetime.datetime.now())
    print('====\n')

joblist = [
    {'crontab': '0/1 * * * *', 'func': p, 'args': ('job1',)},
    {'crontab': '0 */2 * * * ?', 'func': p, 'args': ('job2',)},
    {'crontab': '0 */3 * * * ? *', 'func': p, 'args': ('job3',)},
]

sync

crontab = Crontab(joblist)
crontab.start()

async

crontab = Crontab(joblist, True)
crontab.start()
# do other thing

sync to async

import threading
def inner():
    crontab = Crontab(job_list)
    while True:
        try:
            crontab.start()
        except:
            logger.info(traceback.format_exc())
timer = threading.Timer(1, inner)
timer.daemon = True
timer.start()

Metadata

Release files for pycronjob 1.2.2

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

Built distribution (wheel)

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

Release files / pycronjob-1.2.2-py3-none-any.whl

Download URL pycronjob-1.2.2-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13ac7bee1fda3a77601c7dfbf0165c19c45436595c321b8e74a6b2fe9b5ac472
BLAKE2b-256 checksum
How to use checksums
a7635dc59d240f53307c04c7cb0272aa584ed59bd61d790bf7cab1ce5ceb0789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.12.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.11

Security for pycronjob 1.2.2

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.

Release history Release notifications | RSS feed

This release

1.2.2 This release

1 release file No provenance

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