Scheduled tasks
Scheduled tasks are background jobs the application runs at an interval: sending the e-mail queue, cleaning up guests, generating the sitemap. They run inside the web application, so they only run while it is running.
The task list
Open System → Maintenance → Schedule tasks.

| Task | What it does |
|---|---|
| Send emails | Sends messages from the queue. Must be enabled, or no e-mail leaves the store. |
| Delete guests | Removes old guest customer records (see the system settings for the age). |
| Clear cache | Empties the cache at the interval. |
| Update currency exchange rates | Fetches rates from the exchange rate provider when auto update is on. |
| Generate sitemap XML file | Writes sitemap.xml for search engines. |
| End of the auctions | Closes auctions whose end date has passed and picks the winners. |
| Cancel unpaid and pending orders | Cancels orders unpaid for longer than the days set in the system settings. |
Plugins can add their own tasks. Run now runs a task immediately.
Configure a task

| Field | What it does |
|---|---|
| Enabled | Whether the task runs. |
| Time interval (in minutes) | How often it runs. |
| Stop on error | Disables the task after a failure, instead of retrying at the next interval. |
| The name of the machine | On a web farm, the task runs only on the server with this name. Empty = every server that runs the application. |
| Store | The store whose context the task runs in (for store-specific data such as the sitemap). |
Restart the application after changing a task, as the notice on the list says.
Several servers
When the store runs on several instances (for example several pods in Kubernetes), every run of a task is claimed atomically in the database, so exactly one instance executes it - no extra setup is needed. Use The name of the machine only to pin a task to one particular server, for example the one that holds files the task writes; in Kubernetes that requires stable pod names (a StatefulSet). See Running in production: Docker and Kubernetes.
Related
Question not answered here? Ask the community on GitHub Discussions ↗