{"id":15295825,"url":"https://github.com/django-commons/django-tasks-scheduler","last_synced_at":"2025-05-16T12:12:01.588Z","repository":{"id":176441629,"uuid":"657635626","full_name":"django-commons/django-tasks-scheduler","owner":"django-commons","description":"Schedule async tasks using redis protocol. Redis/ValKey/Dragonfly or any broker using the redis protocol can be used.","archived":false,"fork":false,"pushed_at":"2025-05-14T16:03:09.000Z","size":3116,"stargazers_count":134,"open_issues_count":2,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-14T17:22:31.584Z","etag":null,"topics":["background-jobs","django","django-application","job-queue","python","redis","scheduled-jobs","scheduled-tasks","task-queue","valkey"],"latest_commit_sha":null,"homepage":"https://django-tasks-scheduler.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/django-commons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"cunla"}},"created_at":"2023-06-23T13:45:44.000Z","updated_at":"2025-05-14T16:03:13.000Z","dependencies_parsed_at":"2024-02-13T16:04:31.000Z","dependency_job_id":"4a995699-01be-4753-9ee1-3d11af00fc64","html_url":"https://github.com/django-commons/django-tasks-scheduler","commit_stats":{"total_commits":206,"total_committers":10,"mean_commits":20.6,"dds":0.3349514563106796,"last_synced_commit":"79a7272efa4e7771ae7e5df2596d39af92fb6d10"},"previous_names":["dsoftwareinc/django-tasks-scheduler","django-commons/django-tasks-scheduler"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-commons%2Fdjango-tasks-scheduler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-commons%2Fdjango-tasks-scheduler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-commons%2Fdjango-tasks-scheduler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/django-commons%2Fdjango-tasks-scheduler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/django-commons","download_url":"https://codeload.github.com/django-commons/django-tasks-scheduler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527099,"owners_count":22085919,"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":["background-jobs","django","django-application","job-queue","python","redis","scheduled-jobs","scheduled-tasks","task-queue","valkey"],"created_at":"2024-09-30T18:08:19.159Z","updated_at":"2025-05-16T12:12:01.579Z","avatar_url":"https://github.com/django-commons.png","language":"Python","funding_links":["https://github.com/sponsors/cunla"],"categories":["Python"],"sub_categories":[],"readme":"Django Tasks Scheduler\n===================\n[![Django CI](https://github.com/django-commons/django-tasks-scheduler/actions/workflows/test.yml/badge.svg)](https://github.com/django-commons/django-tasks-scheduler/actions/workflows/test.yml)\n![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/cunla/b756396efb895f0e34558c980f1ca0c7/raw/django-tasks-scheduler-4.json)\n[![badge](https://img.shields.io/pypi/dm/django-tasks-scheduler)](https://pypi.org/project/django-tasks-scheduler/)\n\nDocumentation can be found in https://django-tasks-scheduler.readthedocs.io/\n\n# Usage\n\n1. Update `settings.py` to include scheduler configuration:\n\n```python\nimport os\nfrom typing import Dict\nfrom scheduler.types import SchedulerConfiguration, Broker, QueueConfiguration\n\nINSTALLED_APPS = [\n    # ...    \n    'scheduler',\n    # ...\n]\nSCHEDULER_CONFIG = SchedulerConfiguration(\n    EXECUTIONS_IN_PAGE=20,\n    SCHEDULER_INTERVAL=10,\n    BROKER=Broker.REDIS,\n    CALLBACK_TIMEOUT=60,  # Callback timeout in seconds (success/failure/stopped)\n    # Default values, can be overriden per task/job\n    DEFAULT_SUCCESS_TTL=10 * 60,  # Time To Live (TTL) in seconds to keep successful job results\n    DEFAULT_FAILURE_TTL=365 * 24 * 60 * 60,  # Time To Live (TTL) in seconds to keep job failure information\n    DEFAULT_JOB_TTL=10 * 60,  # Time To Live (TTL) in seconds to keep job information\n    DEFAULT_JOB_TIMEOUT=5 * 60,  # timeout (seconds) for a job\n    # General configuration values\n    DEFAULT_WORKER_TTL=10 * 60,  # Time To Live (TTL) in seconds to keep worker information after last heartbeat\n    DEFAULT_MAINTENANCE_TASK_INTERVAL=10 * 60,  # The interval to run maintenance tasks in seconds. 10 minutes.\n    DEFAULT_JOB_MONITORING_INTERVAL=30,  # The interval to monitor jobs in seconds.\n    SCHEDULER_FALLBACK_PERIOD_SECS=120,  # Period (secs) to wait before requiring to reacquire locks\n)\nSCHEDULER_QUEUES: Dict[str, QueueConfiguration] = {\n    'default': QueueConfiguration(URL='redis://localhost:6379/0'),\n}\n```\n\n2. Update `urls.py` to include scheduler urls:\n\n```python\nfrom django.urls import path, include\n\nurlpatterns = [\n    # ...\n    path('scheduler/', include('scheduler.urls')),\n]\n```\n\n3. Run migrations:\n\n```bash\npython manage.py migrate\n```\n\n4. Check out the admin views:\n   ![](./docs/media/admin-tasks-list.jpg)\n\n# Sponsor\n\ndjango-tasks-scheduler is developed for free.\n\nYou can support this project by becoming a sponsor using [this link](https://github.com/sponsors/cunla).\n\n# Contributing\n\nInterested in contributing, providing suggestions, or submitting bugs? See\nguidelines [at this link](.github/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjango-commons%2Fdjango-tasks-scheduler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjango-commons%2Fdjango-tasks-scheduler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjango-commons%2Fdjango-tasks-scheduler/lists"}