Skip to main content

Urd

Urd is a scheduler for Django projects. Some features:

  • schedule < 1m time slots

  • single concurrent execution [1]

  • fast enable/disable [2]

  • simple deployment

  • no extra dependencies beyond Django

Setup

  • Install urd pip install urd

  • Add urd to INSTALLED_APPS

  • Run manage.py migrate

  • Start the scheduler with manage.py monitor

Usage

  • Define a tasks.py module in the app that should have tasks.

  • Create a function like this:

@schedulable_task
def my_task(heartbeat):
    for foo in bar:
        heartbeat()
        do_some_task()

Calling heartbeat() regularly is important to make the task cancellable in a timely manner.

Now define a task in the iommi admin. It will be enabled pretty much as soon as you save.

Administration

Urd ships with integration for the iommi admin.

Why not cron/celery/django-q

  • Cron didn’t work for me because I need to execute a function more often than once a minute

  • Cron also doesn’t work for me because if you do once per minute, and the task takes two minutes, you get TWO executing processes of that task for a while. This can be disastrous for a few reasons, and can cause things to spiral out of control.

  • Celery/django-q are task queues, not schedulers. They have scheduler components, but they don’t have a way to ensure only one process at a time runs a specific task.

  • Django-q doesn’t allow schedules that execute more often than once per minute

  • Django-q caused me a lot of problems where the schedule seemed to put future items in the queue, and I couldn’t make it stop trying to execute them.

What does urd mean?

Urd (or Urðr, or Wyrd) is one of the Norns, the goddesses who weave the destiny of gods and humans.

Metadata

Release files for urd 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urd 1.4.0
File Size Uploaded Provenance Actions
urd-1.4.0.tar.gz 49.2 kB Without provenance Details for urd-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for urd 1.4.0
File Interpreter ABI Platform Actions
urd-1.4.0-py3-none-any.whl Python 3 none any Details for urd-1.4.0-py3-none-any.whl

Total release size: 67.2 kB

Release files / urd-1.4.0.tar.gz

Download URL urd-1.4.0.tar.gz
Size 49.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5d126ee05c12843a6df557f1770ea130328aaa04766daf1fe3d46b69628468e
BLAKE2b-256 checksum
How to use checksums
5a5878d7c1d518d822a6922a5db3ad0b45d70eabd246672b8d0b274a8209b851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / urd-1.4.0-py3-none-any.whl

Download URL urd-1.4.0-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0484b7919a5c76e7135df3103835b7d693b2ec2c30839bdea1702b53e5fe2129
BLAKE2b-256 checksum
How to use checksums
d4084bfcb8ff0c568b08e6eeb79ac3209dfb3a04fb429b2db9f726c2702a0e56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for urd 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page