Skip to content

Thoxvi/PyCronSchedule

Repository files navigation

PyCronSchedule

Travis PyPI Anti 996 License: GPL v3

Python's crontab syntax scheduler.

Features

  • Easy to use and feature-rich API
  • Scheduling unit is a function
  • Syntax similar to Linux Crontab timing tasks
  • Provides millisecond precision
  • Use multi-process optimization

Usage

$ pip install py-cron-schedule
from py_cron_schedule import CronSchedule, CronFormatError

if __name__ == '__main__':
  cs = CronSchedule()
  cs.add_task("ms", "* * * * * * *", lambda: print("Every Millsecond"))
  cs.add_task("sec", "* * * * * *", lambda: print("Every Second"))
  cs.add_task("min", "* * * * *",lambda :print("Every Minute"))
  cs.add_task("hour", "0 * * * *",lambda :print("Every Hour"))
  
  cs.start()

API Documentation

License

  1. Under the Creative Commons GPL-3.0 Unported license. See the LICENSE file for details.
  2. Under the Anti 996 License. See the Anti 996 LICENSE file for details.