Back to rankings

Miksus/rocketry

Pythonrocketry.readthedocs.io

Modern scheduling library for Python

schedulerschedulingframeworkpydanticpythonautomationautomation-framework
Star Growth
Stars
3.4k
Forks
115
Weekly Growth
Issues
46
1k2k3k
Sep 2021Apr 2023Dec 2024Jul 2026
ArtifactsPyPIpip install rocketry
README

Rocketry

The engine to power your Python apps

Test Test coverage Package version Supported Python versions


What is it?

Rocketry is a modern statement-based scheduling framework for Python. It is simple, clean and extensive. It is suitable for small and big projects.

This is how it looks like:

from rocketry import Rocketry
from rocketry.conds import daily

app = Rocketry()

@app.task(daily)
def do_daily():
    ...

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

Core functionalities:

  • Powerful scheduling
  • Concurrency (async, threading, multiprocess)
  • Parametrization
  • Task pipelining
  • Modifiable session also in runtime
  • Async support

Links:

Why Rocketry?

Unlike the alternatives, Rocketry's scheduler is statement-based. Rocketry natively supports the same scheduling strategies as the other options, including cron and task pipelining, but it can also be arbitrarily extended using custom scheduling statements.

Here is an example of custom conditions:

from rocketry.conds import daily, time_of_week
from pathlib import Path

@app.cond()
def file_exists(file):
    return Path(file).exists()

@app.task(daily.after("08:00") & file_exists("myfile.csv"))
def do_work():
    ...

Rocketry is suitable for quick automation projects and for larger scale applications. It does not make assumptions of your project structure.

Installation

Install Rocketry from PyPI:

pip install rocketry

More Examples

Here are some more examples of what it can do.

Scheduling:

from rocketry.conds import every
from rocketry.conds import hourly, daily, weekly, 
from rocketry.conds import time_of_day
from rocketry.conds import cron

@app.task(every("10 seconds"))
def do_continuously():
    ...

@app.task(daily.after("07:00"))
def do_daily_after_seven():
    ...

@app.task(hourly & time_of_day.between("22:00", "06:00"))
def do_hourly_at_night():
    ...

@app.task((weekly.on("Mon") | weekly.on("Sat")) & time_of_day.after("10:00"))
def do_twice_a_week_after_ten():
    ...

@app.task(cron("* 2 * * *"))
def do_based_on_cron():
    ...

Pipelining tasks:

from rocketry.conds import daily, after_success
from rocketry.args import Return

@app.task(daily.after("07:00"))
def do_first():
    ...
    return 'Hello World'

@app.task(after_success(do_first))
def do_second(arg=Return('do_first')):
    # arg contains the value of the task do_first's return
    ...
    return 'Hello Python'

Parallelizing tasks:

from rocketry.conds import daily

@app.task(daily, execution="main")
def do_unparallel():
    ...

@app.task(daily, execution="async")
async def do_async():
    ...

@app.task(daily, execution="thread")
def do_on_separate_thread():
    ...

@app.task(daily, execution="process")
def do_on_separate_process():
    ...

Interested?

Read more from the documentation.

About Library

Related repositories
apache/airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

PythonPyPIApache License 2.0airflowapache
airflow.apache.org
46.2k17.4k
ityouknow/spring-boot-examples

about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。

JavaMavenspring-bootspring-data-jpa
ityouknow.com/spring-boot.html
30.5k12.2k
xuxueli/xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)

JavaMavenGNU General Public License v3.0xxl-jobjob
xuxueli.com/xxl-job/
30.4k11.5k
kestra-io/kestra

Event Driven Orchestration & Scheduling Platform for Mission Critical Applications

JavaMavenApache License 2.0orchestrationdata-orchestration
go.kestra.io/home
27.4k2.8k
redisson/redisson

Redisson: Valkey & Redis Java Client and Real-Time Data Platform. Sync/Async/RxJava/Reactive API. Over 50 Valkey and Redis based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Spring, Tomcat, Scheduler, JCache API, Hibernate, RPC, local cache..

JavaMavenApache License 2.0javaredis
redisson.pro
24.4k5.5k
OptimalBits/bull

Premium Queue package for handling distributed jobs and messages in NodeJS.

JavaScriptnpmOthernodejsmessage-queue
16.2k1.4k
dagster-io/dagster

An orchestration platform for the development, production, and observation of data assets.

PythonPyPIApache License 2.0data-pipelinesdagster
dagster.io
15.9k2.2k
triggerdotdev/trigger.dev

Trigger.dev – build and deploy fully‑managed AI agents and workflows

TypeScriptnpmApache License 2.0automationorchestration
trigger.dev/changelog
15.7k1.4k
agenda/agenda

Lightweight job scheduling for Node.js

HTMLOthercronscheduler
agenda.github.io/agenda/
9.7k847
PowerJob/PowerJob

Enterprise job scheduling middleware with distributed computing ability.

JavaMavenApache License 2.0schedulerworkflow
powerjob.tech
7.8k1.4k
go-co-op/gocron

Easy and fluent Go cron scheduling. This is a fork from https://github.com/jasonlvhit/gocron

GoGo ModulesMIT Licensecronscheduler
7.1k349
quartznet/quartznet

Quartz Enterprise Scheduler .NET

C#Apache License 2.0c-sharpdotnet
quartz-scheduler.net
7.1k1.7k