Skip to main content

Thread-based task scheduling management.

Project description

Schedule Manager

Build Status codecov PyPI

Thread-based task scheduling management.

Schedule manager provide an easy way to schedule periodic jobs.
Periodic, daily, weekly, monthly or even non-periodic jobs are available for scheduling as tasks.

Example Code

from schedule_manager import ScheduleManager
from datetime import datetime


def example_job():
    print("Working now {}".format(datetime.now().strftime("%Y-%m-%d %H:%M:%S")))


manager = ScheduleManager()

# Schedule a periodic task: do job every 60 seconds
manager.register_task(name="task1", job=example_job).period(60).start()
# Schedule a daily task: do job at 18:00 every day
manager.register_task(name="task2", job=example_job).period_day_at("18:00:00").start()
# Schedule a periodic task: start task at 21:00
manager.register_task(name="task3", job=example_job).period(120).start_at("21:00:00").start()
# Schedule a non-periodic task: do job 5 times
manager.register_task(name="task4", job=example_job).period(30).nonperiodic(5).start()


# Pause task1
manager.task("task1").pause()



# Stop all tasks
manager.all_tasks.stop()

Installation

Install schedule manager with pip:

pip install schedule-manager

Documentation

Documentation is available at schedulemanager.readthedocs.io.

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

schedule-manager-0.1.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

schedule_manager-0.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file schedule-manager-0.1.1.tar.gz.

File metadata

  • Download URL: schedule-manager-0.1.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for schedule-manager-0.1.1.tar.gz
Algorithm Hash digest
SHA256 71a7eb1d56673b60f860466a404e2d921121af56dd7cc8084a8fd7901f443ed1
MD5 6cf98975e48375c6178d00ea263c6104
BLAKE2b-256 83aeb90deb8394bf8104da4f20634f2e72f1dbcea19c103fc5b262766d3a0497

See more details on using hashes here.

File details

Details for the file schedule_manager-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: schedule_manager-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for schedule_manager-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a893a6327da73e7cf9822c97e10ee8df122b037b3689344dfadca015c0ae36b
MD5 9c26adef28d5b2798a8e86c8cf89c29e
BLAKE2b-256 2a6469d352cda64879f9354a6fa49f314cc8e6b5d648630a355bc79466306e5b

See more details on using hashes here.

Supported by

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