Skip to content
s3ths1Public

About

A modern, lightweight and robust task manager with a user-friendly interface and a wide range of features, using the low-level asyncio API and more.

Resources

Contributing

Stars

48 stars

Watchers

1 watching

Forks

Repository files navigation

Jobify

Event-loop-driven job scheduler for Python.

Schedule jobs to run immediately, after a delay, at a specific time, or on a cron schedule - with second-level precision. No polling loops. SQLite persistence built in.

Uses just ~30 MB of RAM at idle.

PyPI version Python 3.11+ License: MIT
Tests CodeQL Dependency Review CodSpeed Telegram
Coverage

Documentation · Quick Start · Comparison · Community Extensions

Contents

Why Jobify

Most Python schedulers rely on polling loops. Jobify uses low-level asyncio timers (call_at) to schedule jobs directly.

  • No idle polling CPU cost
  • Sub-millisecond trigger precision
  • Native async-first execution model

If your workload is bursty or downstream services are sensitive, use Queue Middleware to add bounded buffering, backpressure, and priority routing.

Installation

pip install jobify

Quick Start

import asyncio

from jobify import Jobify, Job

app = Jobify()


@app.task
async def hello(name: str) -> None:
    print(f"Hello, {name}")


async def main() -> None:
    async with app:
        job: Job = await hello.push("Alex")
        await job.wait()

if __name__ == "__main__":
    asyncio.run(main())
Extended example (cron, delay, absolute time)
import asyncio
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo

from jobify import Jobify, Job

UTC = ZoneInfo("UTC")
app = Jobify(tz=UTC)


@app.task(cron="* * * * * * *")  # every second
async def my_cron() -> None:
    print("cron tick")


@app.task
def my_job(name: str) -> None:
    now = datetime.now(tz=UTC)
    print(f"Hello, {name}! at {now!r}")


async def main() -> None:
    async with app:
        await my_job.push("Alex")

        run_next_day = datetime.now(tz=UTC) + timedelta(days=1)
        job_at: Job = await my_job.schedule("Connor").at(run_next_day)
        job_delay: Job = await my_job.schedule("Sara").delay(20)
        job_cron: Job = await my_cron.schedule().cron("* * * * *", job_id="dynamic_cron_id")

        # block until every scheduled job is done
        await app.wait_all()


if __name__ == "__main__":
    asyncio.run(main())

Waiting for jobs

Jobify provides two ways to wait for job execution:

  • await job.wait() - waits for a specific job to reach a terminal state.
  • await app.wait_all() - wait until every scheduled job has finished (statuses SUCCESS, FAILED or TIMEOUT). The call returns as soon as the internal jobs registry becomes empty.

This is the simplest way to keep your process alive until the background work is complete, eliminating the need for while True: sleep() loops and manual result tracking.

Key Features

Feature comparison (Jobify vs Taskiq/APScheduler/Celery)
Feature name Jobify Taskiq APScheduler (v3) Celery
Event-driven Scheduling ✅ (Low-level timer) ❌ (Polling/Loop) ❌ (Interval) ❌ (Polling/Loop)
Async Native (asyncio) ✅ ✅ ❌ (Sync mostly) ❌
Context Injection ✅ ✅ ❌ ❌
FastAPI-style Routing ✅ ❌ ❌ ❌
Middleware Support ✅ ✅ ❌ (Events only) ❌ (Signals)
Lifespan Support ✅ ✅ ❌ ❌
Exception Handlers ✅ (Hierarchical) ❌ ❌ ❌
Job Cancellation ✅ ❌ ✅ ✅
Cron Scheduling ✅ (Seconds level) ✅ (Minutes) ✅ ✅
Misfire Policy ✅ ❌ ✅ ❌
Run Modes (Thread/Process) ✅ ✅ ✅ ✅
Zero-config Persistence ✅ (SQLite default) ❌ (Needs Broker) ✅ ❌ (Needs Broker)
Broker-backend execution ❌ (roadmap) ✅ ❌ ✅

When to Choose Jobify

Use Jobify when:

  • you need precise in-process scheduling without polling overhead
  • you want typed, framework-like APIs for task registration and routing
  • you need queue-based backpressure and priority controls in a single process

License

This project is licensed under the MIT license.

About

A modern, lightweight and robust task manager with a user-friendly interface and a wide range of features, using the low-level asyncio API and more.

Resources

Contributing

Stars

48 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages