{"id":15658278,"url":"https://github.com/boxed/urd","last_synced_at":"2025-05-01T10:17:03.592Z","repository":{"id":65557644,"uuid":"594680949","full_name":"boxed/urd","owner":"boxed","description":"A scheduler for Django projects","archived":false,"fork":false,"pushed_at":"2023-11-21T10:10:10.000Z","size":60,"stargazers_count":34,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-01T10:13:02.474Z","etag":null,"topics":["django","scheduler"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxed.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-29T10:04:27.000Z","updated_at":"2025-03-19T14:01:11.000Z","dependencies_parsed_at":"2024-10-23T05:47:50.513Z","dependency_job_id":"f92bac96-0e6a-499e-886e-2966c16ebbcf","html_url":"https://github.com/boxed/urd","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"a49628620dacf75e419bfaf80d642fce7a768635"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxed%2Furd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxed%2Furd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxed%2Furd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxed%2Furd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxed","download_url":"https://codeload.github.com/boxed/urd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251857032,"owners_count":21655122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","scheduler"],"created_at":"2024-10-03T13:11:41.114Z","updated_at":"2025-05-01T10:17:03.564Z","avatar_url":"https://github.com/boxed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Urd\n---\n\nUrd is a scheduler for Django projects. Some features:\n\n- schedule \u003c 1m time slots\n- single concurrent execution [#single]_\n- fast enable/disable [#fastdisable]_\n- simple deployment\n- no extra dependencies beyond Django\n\n.. [#single]\n\n    If tasks take longer to execute than the time to the next execution slot, you get a warning on the next execution. But not simultaneous execution or wild buildup of queues. There is no queue.\n\n.. [#fastdisable]\n\n    It's vitally important to be able to stop a runaway process. With the ``heartbeat``, and with the worker reading the database state before executing, it's easy and fast to disable a job.\n\n\nSetup\n=====\n\n- Install urd ``pip install urd``\n- Add ``urd`` to ``INSTALLED_APPS``\n- Run ``manage.py migrate``\n- Start the scheduler with ``manage.py monitor``\n\n\nUsage\n=====\n\n- Define a ``tasks.py`` module in the app that should have tasks.\n- Create a function like this:\n\n.. code-block:: python\n\n    @schedulable_task\n    def my_task(heartbeat):\n        for foo in bar:\n            heartbeat()\n            do_some_task()\n\n\nCalling ``heartbeat()`` regularly is important to make the task cancellable in a timely manner.\n\nNow define a task in the iommi admin. It will be enabled pretty much as soon as you save.\n\n\nAdministration\n==============\n\nUrd ships with integration for the `iommi \u003chttps://docs.iommi.rocks\u003e`_ admin.\n\n\nWhy not cron/celery/django-q\n============================\n\n- Cron didn't work for me because I need to execute a function more often than once a minute\n- 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.\n- 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.\n- Django-q doesn't allow schedules that execute more often than once per minute\n- 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.\n\n\nWhat does urd mean?\n===================\n\nUrd (or Urðr, or Wyrd) is one of the Norns, the goddesses who weave the destiny of gods and humans.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxed%2Furd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxed%2Furd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxed%2Furd/lists"}