Skip to content

Scheduling and Queues

Matt MacDougall edited this page Sep 9, 2026 · 2 revisions

Scheduling and queues

Schedules decide when work enters the queue. A separate worker consumes queued work and generates feed files.

Documentation baseline: release v1.0.0. Last reviewed: 2026-09-09.

Enable module cron processing

Go to Stores > Configuration > Mage-OS > Mage-OS Shopping Feed > General Info and set Cron Enabled to Yes when Magento cron should manage the module.

The module defines its own mageos_shopping_feed cron group:

Job Built-in schedule Purpose
mageos_shopping_feed_schedule Minute 10 of every hour Adds feeds due in the current store-timezone hour to the queue
mageos_shopping_feed_process Every minute Processes one unread queue item

Magento's normal cron runner must be installed and healthy. Saving a feed schedule does not replace the platform cron requirement.

Configure a feed schedule

Open a feed, select Run Schedule, then add one or more rows:

  • Start At selects the daily hour.
  • Batch Mode splits one complete generation across multiple worker runs.
  • Batch Limit sets the maximum number of product objects processed per batch.

Allow enough time between schedules for the earlier generation and any uploads to finish. The first schedule row's batch settings are also used by Run Now.

Queue behavior

  • Manual requests are selected before scheduled requests when both are waiting.
  • The oldest unread item is processed first within that priority.
  • A worker handles one queue item per invocation.
  • A schedule does not enqueue the same feed again while unread work for that feed exists.
  • Queue lookups remain independent across feeds. An already queued feed does not suppress another due feed, and a previously empty lookup does not hide newly queued work.
  • Queued batch state is retained so the next worker continues from the prior offset.

Standalone command scheduling

If Cron Enabled is No, arrange both commands in the hosting scheduler. The CLI commands run in detached mode and are allowed even when module cron processing is disabled:

10 * * * * cd /path/to/magento && php bin/magento mage-os:shopping-feed:schedule
* * * * * cd /path/to/magento && php bin/magento mage-os:shopping-feed:generate

Use the correct PHP binary, Magento filesystem user, and absolute application path for the environment. Do not run both Magento cron and these standalone entries unless duplicate invocations are understood and monitored.

Verify scheduling

  1. Save a schedule a few minutes ahead in the store timezone.
  2. Confirm the schedule runner creates a Pending item.
  3. Confirm the process runner changes the feed to Processing, then Completed.
  4. Check the final file timestamp and feed log.

If the feed stays pending, see Logs and troubleshooting.

Clone this wiki locally