You wrote cleanup_stale_drafts, a management command that deletes week-old draft posts, and python manage.py cleanup_stale_drafts works every time you run it. Now it has to run at 03:00 every night without you. The first crontab line dies with ModuleNotFoundError: No module named 'django'. Or you start a scheduler inside the app, and the next morning three servers have each sent the "drafts cleaned up" email four times.
Django has never shipped a scheduler, and the tasks framework that arrived in Django 6.0 doesn't add one: it queues work, it doesn't own a clock. So a Django cron job is two decisions. What runs, which is almost always a management command, and who decides it's 03:00: cron, Celery beat, django-q2, Huey, your platform, or an outside service calling a view. This guide covers each with code, the traps that are specific to Django, and a builder that writes the command and its trigger for your schedule. For Python scripts that live outside Django, the Python cron jobs guide covers systemd timers, APScheduler and serverless crons.
Pick the clock by how your Django app is deployed
The right answer depends less on taste than on how many copies of your app are running. One VPS with one gunicorn worker has no duplicate-run problem, so crontab is fine. Three containers behind a load balancer, each with four workers, turn anything that starts with Django into twelve schedulers. Set your own numbers and see which approaches still fire the 03:00 job once.
APScheduler started in AppConfig.ready()
A scheduler thread in every gunicorn worker
12 runscrontab baked into the app image
cron runs in every container
3 runscelery worker -B
Beat embedded in each worker container
3 runsrun_huey on every server
Each consumer enqueues periodic tasks
3 runsqcluster on every server
Due schedules are rows locked in a transaction
1 runHeroku Scheduler, Render or Railway cron
The platform starts one job process
1 runCrontap calls one protected view
The load balancer hands the request to one worker
1 run
3 × 4 = 12 web processes. A scheduler that starts with the app sends 12 copies of the 03:00 email.
The same options side by side. "You keep running" means a process of yours that must stay up for the schedule to exist.
| Approach | You keep running | Timezone | Edit without a deploy | Status (Nov 2026) |
|---|---|---|---|---|
| crontab + manage.py | Nothing extra, cron is the daemon | Server zone | No | Part of the OS |
| django-crontab, django-cron | System cron | Server zone | No | Last releases 2016 and 2022 |
| Celery beat | One beat, workers, a broker | CELERY_TIMEZONE | No | Celery 5.7.0 |
| django-celery-beat | One beat, workers, a broker | Per schedule | Yes, in the admin | 2.9.0 |
| django-q2 | qcluster (the database can be the broker) | Q_CLUSTER time_zone | Yes, in the admin | 1.11.1 |
| Huey | One periodic consumer, Redis or SQLite | TIME_ZONE with utc off | No | 3.5.4 |
| Heroku, Render, Railway | Nothing, a process per run | UTC | Yes, in the dashboard | Platform |
| HTTP view + Crontap | Nothing, the web app is already up | Per schedule | Yes, in Crontap | Hosted |
Write the job once, as a management command
Before you pick a clock, put the work where every clock can reach it. A custom management command is a Command class in yourapp/management/commands/<name>.py with a handle() method. It loads settings and apps for you, takes arguments, and can be run by hand in the middle of an incident. Every option in this guide ends in the same call: python manage.py cleanup_stale_drafts from a shell, or call_command("cleanup_stale_drafts") from Python.
# blog/management/commands/cleanup_stale_drafts.py
from datetime import timedelta
from django.core.management.base import BaseCommand
from django.utils import timezone
from blog.models import Post
class Command(BaseCommand):
help = "Delete drafts nobody has touched for 7 days."
def add_arguments(self, parser):
parser.add_argument("--dry-run", action="store_true")
def handle(self, *args, dry_run=False, **options):
cutoff = timezone.now() - timedelta(days=7)
stale = Post.objects.filter(status="draft", updated_at__lt=cutoff)
count = stale.count()
if not dry_run:
stale.delete()
self.stdout.write(self.style.SUCCESS(f"{count} stale drafts"))Two habits make a command scheduler-friendly. Raise CommandError when something is wrong: manage.py then exits with status 1, which crontab wrappers, platform schedulers and Kubernetes all read as a failure, and call_command() raises it, so a view returns a 500. And write to self.stdout instead of using print, so a test can capture the output with call_command(..., stdout=buf).
The builder below writes that command, then the files for whichever trigger you pick. Switching the trigger never changes the command file, and that's the point: the clock is a deployment decision you can change later without touching the job.
Django job builder
manage.py cleanup_stale_drafts · HTTP trigger
- Clock
- Crontap, outside your app
- Timezone
- Per schedule
- Always on
- Nothing, the app is up
# blog/management/commands/cleanup_stale_drafts.py
from django.core.management.base import BaseCommand, CommandError
from django.utils import timezone
class Command(BaseCommand):
help = "Runs on a schedule. Safe to run by hand, too."
def add_arguments(self, parser):
parser.add_argument("--dry-run", action="store_true")
def handle(self, *args, dry_run=False, **options):
started = timezone.now()
processed = 0
# Do the work here. On failure, raise CommandError("why"):
# manage.py then exits with status 1 and call_command() raises.
self.stdout.write(
self.style.SUCCESS(
f"cleanup_stale_drafts: {processed} rows in {timezone.now() - started}"
)
)
Add empty __init__.py files in blog/management/ and blog/management/commands/, then try it: python manage.py cleanup_stale_drafts --dry-run
The command file never changes. Switch the trigger and only the clock moves.
crontab and manage.py: the classic, and what cron doesn't give Django
On a single server, crontab is the shortest path, and it's where most Django crons start. It's also where they fail most confusingly, because cron runs your command in a nearly empty environment: /bin/sh, a minimal PATH, your home directory as the working directory, and none of the variables from your shell profile or .env. (What is a cron job in Linux explains the five fields if they're new.) Put the setup in a short wrapper script instead of one long crontab line:
#!/bin/sh
# /srv/mysite/bin/run_cleanup_stale_drafts.sh (chmod +x)
set -eu
cd /srv/mysite
set -a; . ./.env; set +a
export DJANGO_SETTINGS_MODULE=mysite.settings
exec /usr/bin/flock -n /tmp/cleanup_stale_drafts.lock \
/srv/mysite/.venv/bin/python manage.py cleanup_stale_drafts# crontab -e
0 3 * * * /srv/mysite/bin/run_cleanup_stale_drafts.sh >> /var/log/mysite/cleanup_stale_drafts.log 2>&1Each line of the wrapper fixes one way cron breaks Django:
- 1
Call the virtualenv's python by its full path
python3under cron is the system interpreter, which has no Django, henceModuleNotFoundError./srv/mysite/.venv/bin/pythonuses the virtualenv's packages without activating anything. Don't writesource .venv/bin/activate: cron runs/bin/sh, wheresourcedoesn't exist. If uv or Poetry manages the environment, the Python guide's crontab section has the equivalent lines. - 2
Set DJANGO_SETTINGS_MODULE yourself
manage.pyfalls back to whatever itsos.environ.setdefaultline names, usuallymysite.settings. If production usesmysite.settings.production, export it in the wrapper or pass--settings. Otherwise the job happily runs with development settings,DEBUG = Trueand maybe a SQLite file nobody looks at. - 3
cd into the project and load the environment
Django computes
BASE_DIRfrom__file__, so Django itself doesn't care where it starts. Your.envloader often does: django-environ and python-dotenv look for the file relative to where you call them, and so do relative paths in your own code.set -a; . ./.env; set +aexports every variable in the file. Keep secrets out of the crontab itself, since anyone who can read it can read them. - 4
Lock the run and keep the output
flock -nmakes a second run exit straight away while the first still holds the lock. The>> log 2>&1redirect keeps tracebacks; without it, cron mails the output to a local mailbox nobody reads. If you add something likedate +%Fto the line, escape the%as\%, because cron turns a bare%into a newline.
The timezone is the server's (timedatectl shows it), not your TIME_ZONE setting. cronie on Fedora and RHEL reads a CRON_TZ= line; Debian and Ubuntu's cron doesn't document one, so convert the time or change the host's zone. In Docker, the crontab belongs in one container, not in the image every replica runs, and the Docker cron jobs guide walks through the options.
Pick crontab when it's one server you control and someone reads the log. Skip it when containers come and go, or when you need to hear about a failed run the same day.
django-crontab, django-cron and django-apscheduler: check the dates first
Search for "Django cron" and the first packages you meet are years old. Here's where they stand on PyPI and GitHub as of November 2026:
- django-crontab reads jobs from a
CRONJOBSsetting and writes them into the server's crontab when you runpython manage.py crontab add. Its last release is 0.7.1 from March 2016, the last commit is from 2018, and the README still says Django 1.8 to 2.0. It's a crontab writer, so you still depend on system cron and keep every trap above. - django-cron (Tivix) has you write job classes with a run-every or run-at schedule, then call
python manage.py runcronsfrom cron every few minutes. Its last release is 0.6.0 from May 2022, with no commits to the main branch since. - django-apscheduler stores APScheduler jobs and their run history in Django models. Its latest release, 0.7.0, is from September 2024, its classifiers stop at Django 5.1, and the last commit was in March 2025. Its own README says to start the scheduler from a dedicated management command in a single process, because a scheduler in each web worker can run jobs twice or miss them.
None of them is broken today, but each adds a dependency to do what one crontab line, or one of the maintained options below, already does. If you inherit one, the management commands it calls are the part worth keeping.
Celery beat and django-celery-beat: when Celery already runs your work
If Celery and a broker already run your background jobs, beat is your clock, and Celery's periodic tasks guide is the reference (Celery 5.7.0 as of November 2026). Beat doesn't run anything itself: it puts a task on the queue at the right moment, and your workers run it. Keep the task a thin wrapper around the management command:
# blog/tasks.py
from celery import shared_task
from django.core.management import call_command
@shared_task
def run_cleanup_stale_drafts():
call_command("cleanup_stale_drafts")# mysite/celery.py, below app.autodiscover_tasks()
from celery.schedules import crontab
app.conf.beat_schedule = {
"cleanup-stale-drafts": {
"task": "blog.tasks.run_cleanup_stale_drafts",
"schedule": crontab(minute="0", hour="3"),
},
}With the standard Django setup (config_from_object("django.conf:settings", namespace="CELERY")), the zone comes from CELERY_TIMEZONE, one for the whole app. Run beat as its own process with celery -A mysite beat. Celery's docs require a single scheduler per schedule, or tasks run twice, and celery worker -B embeds beat in a worker, so scaling that worker scales beat with it.
django-celery-beat (2.9.0, which lists Django 6.0 support, as of November 2026) moves the schedule into the database. Add django_celery_beat to INSTALLED_APPS, run migrate, and start beat with --scheduler django_celery_beat.schedulers:DatabaseScheduler. Schedules become CrontabSchedule and PeriodicTask rows that staff can pause, retime or trigger from the Django admin, and each crontab row stores its own timezone. One warning from its docs: if you change TIME_ZONE later, existing schedules keep the old zone until you reset last_run_at on every periodic task. It's still beat underneath, so still exactly one.
Pick beat when you already pay for workers and a broker. Skip it when you'd be adding Redis, a worker and beat just to run one job a night.
django-q2 and Huey: lighter queues with a clock built in
If you don't run Celery, two smaller task queues include scheduling and fit Django well.
django-q2 is the maintained fork of django-q, whose last release (1.3.9) is from June 2021; django-q2 is at 1.11.1 as of November 2026. It can use your database as the broker ("orm": "default" in Q_CLUSTER), so there's no Redis to run, and schedules are Schedule rows you can edit in the admin. Cron schedules need the croniter package:
from django_q.models import Schedule
Schedule.objects.update_or_create(
name="cleanup_stale_drafts",
defaults={
"func": "django.core.management.call_command",
"args": "'cleanup_stale_drafts'",
"schedule_type": Schedule.CRON,
"cron": "0 3 * * *",
},
)Run python manage.py qcluster next to your web process. Cron schedules are read in Q_CLUSTER["time_zone"], which defaults to TIME_ZONE when USE_TZ is on. After downtime, the default catch_up: True runs every missed slot, so set it to False if one catch-up run is enough. In the 1.11 source, each cluster claims due schedules with select_for_update() inside a transaction, which is why the replica view above shows a single run even with a qcluster on every server (on Postgres or MySQL).
Huey (3.5.4 as of November 2026) is a small queue that runs on Redis or SQLite, with a Django integration in huey.contrib.djhuey. Periodic tasks are decorators in your app's tasks.py, and python manage.py run_huey starts the consumer:
# blog/tasks.py
from django.core.management import call_command
from huey import crontab
from huey.contrib.djhuey import db_periodic_task, lock_task
@db_periodic_task(crontab(minute="0", hour="3"))
@lock_task("cleanup_stale_drafts")
def run_cleanup_stale_drafts():
call_command("cleanup_stale_drafts")db_periodic_task closes stale database connections around the task, and lock_task stops runs from overlapping. Two traps are worth knowing. Huey matches crontab() against UTC by default ("utc": True), so hour="3" means 03:00 UTC unless you set "utc": False; then it follows the process's local time, which Django sets from TIME_ZONE. And every consumer enqueues periodic tasks, so if you run more than one, start all but one with --no-periodic.
Pick django-q2 when you want admin-editable schedules without Redis. Pick Huey when you want a small, fast queue with schedules in code. Either way, it's one more process to deploy and keep an eye on.
Django 6's tasks framework: a queue interface, not a scheduler
Django 6.0 added django.tasks, and it's tempting to read it as Django finally getting cron. It isn't. You decorate a function with @task, call .enqueue(), and a backend stores it for a worker. On a backend that supports it, run_after sets the earliest time a task may start. That's a delay for one task, not a recurring schedule.
from django.tasks import task
@task
def rebuild_search_index(post_id):
...
rebuild_search_index.enqueue(post_id=post.pk)As of Django 6.1 (6.1.3, November 2026), the built-in backends are ImmediateBackend, which runs the task right away in the calling thread, and DummyBackend, which stores it and never runs it. Django's docs are plain about it: the framework "does not provide a worker mechanism", and production needs a backend with a worker process and a durable queue. Third-party backends fill that gap: django-tasks-db keeps tasks in your database and runs them with manage.py db_worker, and Huey ships a django.tasks backend.
So the tasks framework answers "run this in the background", and you still need one of the clocks in this guide to answer "run this at 03:00". It pairs well with the HTTP trigger below: the view enqueues, a worker does the slow part.
Heroku, Render, Railway and Kubernetes: let the platform start the command
On a platform there's often no machine to put a crontab on, and its scheduler can run python manage.py cleanup_stale_drafts in a fresh process with your app's code and config vars. That solves the environment problems from the crontab section for free. What's left is the timezone and the failure story. Here's what each vendor's docs say as of November 2026:
| Platform | Schedule | Timezone | Worth knowing |
|---|---|---|---|
| Heroku Scheduler | Every 10 min, hourly or daily | UTC | Best effort: a run can rarely be skipped or run twice |
| Render cron jobs | Standard cron | UTC | One active run at a time, 12-hour cap, $1 minimum per job per month |
| Railway cron | Standard cron, 5+ min apart | UTC | Skips a run while the last one is still going; the process must exit |
| Kubernetes CronJob | Standard cron | timeZone field | concurrencyPolicy: Forbid stops a run from overlapping the last one |
Every run boots Django from scratch, so a job that runs every minute pays the import and connection cost every minute. On Heroku, a scheduled dyno is also stopped once it has run for about as long as its interval, so a daily job is fine and a ten-minute job has ten minutes. The Heroku and Render pages compare each one with an external scheduler in more detail.
The HTTP trigger: one protected view, called from outside
If your Django app already serves traffic, the job doesn't need a scheduler process at all. Add a view that runs the management command, protect it with a secret header, and let an external scheduler call that URL on a cron. The load balancer hands the request to one worker on one server, so the job runs once however many replicas you have, and the schedule is visible and editable without a deploy.
# blog/views.py
import hmac
import os
from django.core.management import call_command
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
@csrf_exempt
@require_POST
def run_cleanup_stale_drafts(request):
expected = f"Bearer {os.environ['CRON_SECRET']}".encode()
given = request.headers.get("Authorization", "").encode()
if not hmac.compare_digest(given, expected):
return HttpResponseForbidden()
call_command("cleanup_stale_drafts") # raises -> 500 -> retried, then alerted
return HttpResponse(status=204)Route it with path("internal/cron/cleanup-stale-drafts/", views.run_cleanup_stale_drafts) in urls.py. csrf_exempt is right here because the caller is a machine sending a secret header, not a browser carrying a session cookie, and hmac.compare_digest compares in constant time, so the secret can't be guessed from response timing.
- 1
Set CRON_SECRET and deploy
Generate a value with
python -c "import secrets; print(secrets.token_urlsafe(32))", add it to the app's environment, and deploy. Call the view once withcurl -X POST -H "Authorization: Bearer $CRON_SECRET"and its URL, and check for a 204. - 2
Create the schedule
In Crontap, add a
POSTto that URL with theAuthorization: Bearer ...header, set the cron to0 3 * * *, and pickAmerica/New_York(or any IANA zone) for this schedule. Runs follow that zone through daylight saving changes, whatever your servers'TIME_ZONEsays. - 3
Press Perform test
Perform test calls the view right now and shows the status code, timing and response, so a 403 from a wrong header or a 500 from the command shows up today instead of at 03:00.
- 4
Decide what failure means
New schedules retry 5xx responses, timeouts and network errors with exponential backoff and record each attempt. When the attempts run out, Crontap alerts you by email on every plan, or in Slack, Discord or Telegram on paid plans.
Running the command inside the request is deliberate: the status code then tells the truth, so a crash becomes a 500 that gets retried and reported. The limit is the request timeout. gunicorn kills a sync worker that takes longer than 30 seconds by default, and many platforms' routers give up around then too. For longer jobs, have the view enqueue the work (a django.tasks task, a Celery task, a django-q2 async_task) and return 202, then ping a heartbeat at the end of the job so you learn whether it finished.
The honest trade-offs: the view is reachable from the internet, so the secret check isn't optional; Crontap calls your code but doesn't host it; and if one run outlasts the interval, the next call can overlap it, so keep the lock from the next section. The free Crontap plan covers two schedules or monitors at intervals down to one hour, and paid plans go down to every minute.
Make the command safe to run twice
Whatever the clock, plan for a second run. Heroku's docs say it can happen, a deploy can restart a scheduler mid-run, a retry resends a request, and someone will run the command by hand during an incident. Django's cache gives you a short guard:
from django.core.cache import cache
from django.core.management.base import BaseCommand
LOCK = "lock:cleanup_stale_drafts"
class Command(BaseCommand):
def handle(self, *args, **options):
# add() only sets the key if it is missing: one winner on Redis or Memcached
if not cache.add(LOCK, "running", timeout=60 * 60):
self.stdout.write("Another run holds the lock, skipping.")
return
try:
... # the work
finally:
cache.delete(LOCK)That lock only works across servers if the cache is shared: LocMemCache, Django's default, lives inside one process. For "at most once per day", add a small model with a UniqueConstraint on the job name and the date, create a row when the run starts, and stop when the insert raises IntegrityError. On Postgres, pg_try_advisory_lock() does the same without a table; the Postgres cron guide covers it, along with pg_cron for SQL-only maintenance.
Know when the job didn't run
Loud failures, like a traceback, a non-zero exit or a 500, are the easy kind. The hard kind is the job that never started: a crontab on a server that got rebuilt, a beat process that didn't come back after a deploy, a Huey consumer started with --no-periodic everywhere. Logs can't show you a run that didn't happen.
For the HTTP trigger, the schedule itself covers loud failures with retries and alerts. For every other clock, have the command report in. A heartbeat is a URL the job calls when it finishes, plus a /fail URL for when it doesn't:
import os
from urllib.request import urlopen
HEARTBEAT = os.environ["HEARTBEAT_URL"] # https://ping.crontap.com/<id>
class Command(BaseCommand):
def handle(self, *args, **options):
try:
... # the work
except Exception:
urlopen(f"{HEARTBEAT}/fail", timeout=10)
raise
urlopen(HEARTBEAT, timeout=10)A /fail ping alerts right away, and silence alerts once the period plus grace has passed. When a job still doesn't fire and you can't see why, work through cron job not running.
FAQ
Django cron job questions
- How do I run a Django management command with cron?
- Put the work in a management command, then call it from a small shell script that cds into the project, loads your .env, exports DJANGO_SETTINGS_MODULE and runs the virtualenv's python by its full path: /srv/mysite/.venv/bin/python manage.py cleanup_stale_drafts. Point a crontab line at that script, redirect the output to a log file, and wrap the call in flock -n so runs can't overlap.
- Why does my Django cron job work by hand but not from cron?
- Cron starts the command with /bin/sh, a minimal PATH, your home directory as the working directory and none of your shell's environment. So python3 is the system interpreter without Django, DJANGO_SETTINGS_MODULE may point at the wrong settings, and DATABASE_URL or SECRET_KEY from your .env are missing. Use the virtualenv's python by full path, cd into the project, and load the environment in a wrapper script.
- Does Django have a built-in scheduler?
- No. Django 6.0 added a tasks framework (django.tasks) for defining and enqueueing background work, and a task can carry run_after to start no earlier than a given time on backends that support it. But Django ships no worker and no periodic or cron scheduling, as of Django 6.1 in November 2026. Something else still has to decide that a job runs at 03:00 every night.
- Is django-crontab still maintained?
- Not actively. As of November 2026 its last PyPI release is 0.7.1 from March 2016, its last commit is from 2018, and its README targets Django 1.8 to 2.0. It also only writes lines into the server's crontab, so you still depend on system cron. django-cron (Tivix) last released 0.6.0 in May 2022. A plain crontab line calling your management command does the same job without the dependency.
- Should I use Celery beat, django-q2 or Huey?
- If Celery already runs your background work, use Celery beat, and django-celery-beat if staff should edit schedules in the admin. Without Celery, django-q2 is the least infrastructure: it can use your database as the broker and its schedules are admin-editable rows. Huey is small and fast with Redis or SQLite, and its schedules live in code with the periodic task decorators.
- How do I let staff change a schedule in the Django admin?
- Use django-celery-beat, whose DatabaseScheduler reads CrontabSchedule and PeriodicTask rows (each crontab can carry its own timezone), or django-q2, whose Schedule model is editable in the admin. Both still need their process running: one celery beat for django-celery-beat, a qcluster for django-q2.
- Why does my scheduled task run several times with gunicorn?
- Any scheduler that starts when Django loads, such as APScheduler started in AppConfig.ready(), starts once per gunicorn worker and once per server, so 3 servers with 4 workers run the job 12 times. The same happens with a crontab baked into every container, celery worker -B on every replica, or several Huey consumers without --no-periodic. Run exactly one scheduler process, or let an outside scheduler call one protected view.
- How do I run a Django management command from a view?
- Call django.core.management.call_command('your_command') inside a view that only accepts POST with a secret Authorization header, compared with hmac.compare_digest. Mark it csrf_exempt because the caller is a machine, not a browser form. Let exceptions propagate so a failure becomes a 500 the scheduler can retry and report. For jobs longer than your request timeout, enqueue the work and return 202.
- What timezone do Django scheduled tasks run in?
- It depends on the clock. crontab uses the server's zone. Celery beat uses CELERY_TIMEZONE for the whole app, while django-celery-beat can store a timezone per crontab schedule. django-q2 uses Q_CLUSTER['time_zone'], which defaults to TIME_ZONE when USE_TZ is on. Huey matches crontab against UTC unless you set 'utc': False. Heroku, Render and Railway crons run in UTC, and Crontap stores an IANA timezone per schedule.
- How do I schedule a Django job on Heroku, Render or Railway?
- Each platform can run python manage.py your_command on a schedule. Heroku Scheduler offers every 10 minutes, hourly or daily, in UTC, and says a run can rarely be skipped or doubled. Render cron jobs take standard cron in UTC with a $1 monthly minimum per job. Railway cron runs in UTC at intervals of at least 5 minutes. If the app is already a web service, an external scheduler calling a protected view avoids a separate job service.
- How do I stop a Django cron job from running twice at once?
- Lock it. On one server, flock -n in the crontab wrapper makes a second copy exit. Across servers, use cache.add() with a timeout on Redis or Memcached (it only adds the key if it is missing), a Postgres advisory lock, or a unique constraint on the job name and date so a second run fails its insert and stops.
- Can I use pg_cron instead of a Django scheduler?
- For pure SQL maintenance such as refreshing a materialized view or deleting old rows, yes: pg_cron runs inside Postgres with no Django process. It can't call your Python code, so model methods, signals, emails and API calls stay out of reach. Keep application jobs in management commands.
- How do I get alerted when a Django scheduled job fails?
- For a job behind an HTTP trigger, Crontap retries 5xx responses, timeouts and network errors, records each attempt, and alerts you by email, or in Slack, Discord or Telegram on paid plans, once the attempts run out. For crontab, Celery, django-q2 or Huey jobs, have the command call a heartbeat URL when it succeeds and its /fail URL when it raises, so a missed night alerts you too.
