Skip to main content

An easy way to make function run as cron

Project description

pyeasycron

Brief Intro

An easy way to make function run as cron.

Installation

pip3 install pyeasycron

Usage

import easycron
from datetime import datetime

# Expected run when '*/2 * * * *' is satisfied
@easycron.cron('*/2 * * * *')
def func1():
    print(f"in func1: {datetime.now()}")

# Expected run when one of ['*/5 8 * * *', '7,14,21 9 * * *'] is satisfied
@easycron.cron(['*/5 8 * * *', '7,14,21 9 * * *'])
def func2():
    print(f"in func2: {datetime.now()}")

if __name__ == '__main__':
    easycron.run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyeasycron-0.1.2.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file pyeasycron-0.1.2.tar.gz.

File metadata

  • Download URL: pyeasycron-0.1.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pyeasycron-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5f3ac7a61418fc0f6e1012ff6a1055235a6ba1b8e25dfe350d489356d40d9f92
MD5 04d948e378af17a9d7dd40c76955372f
BLAKE2b-256 fadce1cea18bfd649185a7567d6d65e5b7b30eb76a33a8b83c192c6ebcc42edc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page