skillfed

timeloop

An elegant way to run period tasks.

timeloop v1.0.2 161.5K downloads/30d#10,629 on PyPI245
Permissive license MIT Abandoned released

What it is and what it does

Timeloop is a lightweight scheduler that runs decorated functions at fixed intervals using separate threads. You define jobs with a decorator specifying a timedelta interval, then call start() to begin execution. Each job runs in its own thread, and the service handles graceful shutdown by waiting for all currently executing tasks to finish before stopping.

The package is designed for simple periodic task patterns—background maintenance jobs, polling loops, or recurring checks. It offers two modes: non-blocking (start in a background thread, requiring manual stop() on exit) and blocking (start in the main thread with automatic graceful shutdown on signal). No external dependencies are required, making it a minimal addition to any project.

Use it for:

  • Run background maintenance tasks at regular intervals without external job queues.
  • Implement polling loops that check an external service at fixed time intervals.
  • Schedule periodic health checks or monitoring tasks within a long-running application.
  • Execute recurring data synchronization or batch processing jobs on a simple interval schedule.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Timeloop runs periodic tasks at fixed intervals on separate threads, with graceful shutdown that waits for in-flight jobs to complete.

No. The package is abandoned (last release 2019-02-12, no maintenance since 2022-12-29) and Python support is unspecified, creating risk for compatibility issues with modern Python versions. For new projects, use a maintained alternative. For existing code already using timeloop, migration is low-friction given the simple API, but do not adopt it for new work.

Install

timeloop on PyPI

pip

pip install timeloop

uv

uv add timeloop

poetry

poetry add timeloop

Installing timeloop

Before you install

Installation is frictionless with no runtime dependencies. However, the package is abandoned—last release was 2019-02-12, over 2740 days ago, with no maintenance activity since 2022-12-29. Use only if you accept that no updates or bug fixes will be forthcoming.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions.

Quickstart

from timeloop import Timeloop
from datetime import timedelta

tl = Timeloop()

@tl.job(interval=timedelta(seconds=2))
def sample_job():
    print("Job executed")

tl.start()
tl.stop()

Python support is unspecified; compatibility with modern Python versions is not documented.

Verify before relying

  • Whether the package works reliably with modern Python versions given unspecified Python support.
  • Whether thread-safety guarantees hold under concurrent job execution or high load.
  • Whether graceful shutdown actually waits for all in-flight tasks before returning.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,740 days since the last release
Last repo commit
First released
Downloads 161,467/month — #10,629 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: timeloop-1.0.2-py2-none-any.whl

Keywords: tasks, jobs, periodic task, interval, periodic job, flask style, decorator

Tags

periodic task schedulerrun jobs at intervalsbackground job runnerthreaded task loopdecorator-based schedulinginterval-based job execution
schedulerabandoned

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

schedule

Schedule provides a human-friendly API for…

permissive · top 5,000 on PyPI

rq-scheduler

Adds job scheduling capabilities to RQ (Redis…

permissive · top 15,000 on PyPI

APScheduler

APScheduler lets you schedule Python code to…

permissive · top 1,000 on PyPI

scheduler

An in-process job scheduler for Python that…

copyleft · top 15,000 on PyPI

aiojobs

aiojobs provides a scheduler for spawning and…

permissive · top 15,000 on PyPI

django-crontab

Integrates system crontab scheduling into…

permissive · top 15,000 on PyPI

django-apscheduler

Adds persistent job scheduling to Django…

permissive · top 15,000 on PyPI

streamlit-autorefresh

Adds a frontend timer to Streamlit apps that…

unclear · top 15,000 on PyPI

Flask-APScheduler

Flask-APScheduler integrates APScheduler with…

permissive · top 15,000 on PyPI

openjd-sessions

Provides a runtime library for executing Open…

permissive · top 15,000 on PyPI