Skip to main content

Simple in-process task scheduler for Python apps

Project description

JustScheduleIt

Simple in-process task scheduler for Python apps.

Use it if:

  • you need to schedule background tasks in the same process, like to update a shared dataframe every hour from S3

Take something else if:

  • you need to schedule persistent/distributed tasks, that should be executed in a separate process (take a look at Celery)

Usage

Just schedule a task

from datetime import timedelta

from justscheduleit import Scheduler, every, run

scheduler = Scheduler()


@scheduler.task(every(timedelta(minutes=1), delay=(0, 10)))
def task():
    print("Hello, world!")


run(scheduler)

sync and async tasks

The scheduler supports both sync and async functions. A sync function will be executed in a separate thread, using anyio.to_thread.run_sync(), so it won't block the scheduler (other tasks).

(Advanced) Hosting

Scheduler is built around Host abstraction. A host is a supervisor that runs 1 or more services, usually as the application entry point.

A scheduler itself is a hosted service. The default justscheduleit.run() internally just creates a host with one service, the passed scheduler, and runs it.

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

justscheduleit-0.1.0.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

justscheduleit-0.1.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file justscheduleit-0.1.0.tar.gz.

File metadata

  • Download URL: justscheduleit-0.1.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.1 CPython/3.12.6 Darwin/23.6.0

File hashes

Hashes for justscheduleit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7b88600a9180895fcb2a40d72639b0debb4c466367eb70a73145e5cd18edbc23
MD5 a9ba9e9e9f43ea2161a295137b6ca13b
BLAKE2b-256 48bc9933cf1f270148fbb863a4fd8dacd520e5ec1ebafde37d84140ba74e030e

See more details on using hashes here.

File details

Details for the file justscheduleit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: justscheduleit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.19.1 CPython/3.12.6 Darwin/23.6.0

File hashes

Hashes for justscheduleit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db0ed7b3f02611e2659e99110450906c056e0887cd173eb4154ad1fc2acacb7c
MD5 b079089de1f4fbaf5f23a7cada516d91
BLAKE2b-256 a1e3ffe291d03f28f9a1a6d71f4a1a9d46a42364bfe14a5e51f1205988c2df88

See more details on using hashes here.

Supported by

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