In this video, we'll explore job scheduling in Node.js with the Agenda package. We'll discover how to create tasks and schedule on an interval, and how to assign priorities to tasks. We'll also explore one-off tasks.
We'll schedule a script that scrapes the top articles from Hacker News using JSDOM, and will explore how to use Better Stack to monitor scheduled tasks.
► RELATED GUIDES
Job Scheduling in Node.js with Agenda: A Beginner's Guide
Job Scheduling in Node.js with BullMQ
Job Scheduling in Python:
► HACKING SCALE NEWSLETTER
► READ MORE
► STAY TUNED
► ADDITIONAL RESOURCES
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
01:39 Setting up MongoDB with Docker
03:15 Installing Agenda
03:47 Creating simple Agenda task
08:50 MongoDB collection data
11:20 Defining web-scraping task with JSDOM
26:40 Agenda task priorities
28:21 Cancelling jobs with Agenda
29:03 Scheduling intervals & one-off tasks in Agenda
31:27 Monitoring Agenda job with Better Stack
#javascript #nodejs #monitoring