Skip to main content

asyncio job scheduler

Project description

aiosched - Python asyncio jobs scheduler

Executes specified asyncio jobs with a chosen interval. Has relatively small number of features but it's fast.

Why one more scheduler?

  • it's extremely accurate and fast
  • it's simple
  • all methods are thread-safe


from aiosched import scheduler
import asyncio

async def test1(a, b, c):
    print(f'JOB1 {a} {b} {c}')

async def test2():

async def test3():

from aiosched import scheduler

loop = asyncio.new_event_loop()
# jobs can be added before actual start in pending mode
job1 = scheduler.create_threadsafe(target=test1, args=(1, 2, 3), interval=1)
job2 = scheduler.create_threadsafe(target=test2, interval=0.5)
# run job once after 5 seconds
job3 = scheduler.create_threadsafe(target=test3, number=1, timer=5)
# cancel job 2
# equal to


or run scheduler loop as coroutine:

loop = asyncio.new_event_loop()
job1 = scheduler.create_threadsafe(target=test1, args=(1,2,3), interval=0.1)
job2 = scheduler.create_threadsafe(target=test2, interval=0.1)


pip3 install aiosched


Read AsyncJobScheduler and AsyncScheduledJob classes documentation in pydoc.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aiosched, version 0.0.25
Filename, size File type Python version Upload date Hashes
Filename, size aiosched-0.0.25.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page