Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Background work: queues, cronjobs and content jobs

Choose where an application's slow or periodic work runs - in the request, in a workflow, a cronjob part, an expqueue job or a kernel content job - with a decision table and patterns for imports, notifications and…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/creators/app-creators/background-work-patterns.md

On this page

Background work: queues, cronjobs and content jobs

This page is for application creators who decide where work runs. A web request should answer fast; anything slow, periodic or large belongs elsewhere. Exponential offers four places.

The job queue dashboard, where background work queued by an application shows up
The job queue dashboard, where background work queued by an application shows up

Contents

  1. The four places
  2. Decision table
  3. Patterns
  4. Common mistakes

The four places

PlaceRunsRead
Cronjob parton a schedule, as a batchCronjobs for applications
expqueue jobas soon as a worker is free, per job, with retriesQueues with expqueue
Content joblarge kernel content operations (remove, copy, move ...) in batchesContent jobs
Workflow event deferred to crona step of a content operation that must waitWorkflows, triggers and events

Decision table

The workPlace
Import a feed every hourcronjob part
Call an external service after each publishworkflow or event listener enqueues an expqueue job
Hold publishing until someone approvesworkflow event deferred to cron
Remove or move a subtree of 50 000 nodescontent job
Send a reminder mail tomorrow at 9expqueue job with not_before
Rebuild a report nightlycronjob part
Generate alt texts for a whole subtreeexpqueue jobs in a group (as expai does)

Patterns

  • Event to queue: a listener or workflow event enqueues a job with an idempotency key ("archive:<object>:<version>") and returns at once; the handler does the slow call.
  • Cron to queue: a cron part finds what is due and enqueues one job per item; workers run them in parallel with retries.
  • Batch with checkpoint: a long job saves progress, so a retry continues instead of starting over.
  • Fan-out with a group: many jobs in one group, with progress and cancel for the whole.

Common mistakes

  • Slow HTTP calls inside the publish request: editors wait, and a failure breaks publishing.
  • A cron part that runs longer than its interval.
  • Secrets in job payloads.
  • Work that is not idempotent and runs twice after a retry.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x