Scheduled Jobs
In this document, you’ll learn what scheduled jobs are in Medusa.
Introduction
Scheduled jobs (also known as cron jobs) are tasks performed at a specific time while the Medusa Backend is running. They’re used to perform asynchronous tasks in the background.
For example, you can synchronize your inventory with an Enterprise Resource Planning (ERP) system once a day using a scheduled job.
In the Medusa Backend, the scheduled jobs queue is implemented using Redis and Bull. So, for scheduled jobs to work, you must have Redis installed and enabled.
Future versions of Medusa will allow switching out Redis and using a different pub/sub service.
Custom Development
Developers can create an unlimited number of scheduled jobs within the Medusa Backend, a plugin, or a custom module.
Learn how to create a scheduled job.