Task queues and background jobs
Every night at midnight, a job emails each user their weekly summary. You add a second server for redundancy, and the next morning every user has two summaries. Background jobs look simple until they run in the wrong place, at the wrong time, or twice.
In this lesson you'll learn to
- Explain what a task queue adds on top of a message queue, and how to write a job's arguments.
- Compare event-driven jobs with schedule-driven jobs, and pick the right trigger for a task.
- Avoid the classic scheduling bugs, such as running on every server, overlapping runs, missed runs, time zones and everyone starting on the hour.
- Keep long and important jobs healthy with chunking, checkpoints, priorities and a missed-run alert.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.