Skip to main content
Version: 2.0.0

Jobs & Tasks

yStore uses two mechanisms for background processing: the Craft CMS queue for async jobs and cron for scheduled tasks.

Queue jobs

These jobs are pushed to the Craft CMS queue and processed asynchronously. You can monitor them in Utilities → Queue Manager in the Craft CP.

JobTriggerDescription
Send Order EmailOrder placed / status changedRenders and sends transactional emails
Generate Invoice PDFOrder placed / manually triggeredGenerates the PDF invoice for an order
Generate Gift Card PDFGift card purchasedCreates the gift card voucher PDF
Send Flow EmailAutomation flow actionDispatches marketing flow emails
Sync Order to StoreOrder status change (online mode)Pushes status update to connected store
Fetch Remote OrdersCRON / manual triggerPulls new orders from connected store
Update Product PricesCRON / importBatch updates product price fields
Rebuild Search IndexCRON / manualRebuilds yStore search index entries

Monitoring the queue

If jobs are failing or stuck:

  1. Go to Craft CP → Utilities → Queue Manager.
  2. Check for failed jobs and their error messages.
  3. Retry failed jobs using the retry button.
  4. If jobs aren't processing, check your web server or PHP-FPM process manager — the queue runner must be active.
Queue runner

For production, run the queue as a daemon process instead of relying on web requests:

php craft queue/listen --verbose

Or add it to a supervisor process configuration for reliability.

Cron jobs

Scheduled tasks run via the system cron. Install the default yStore cron schedule with:

php craft yui/cron/install

Default cron schedule

TaskScheduleDescription
Analytics collectionEvery 30 minCollects and aggregates store analytics
Sitemap updateDaily at 2:00Regenerates product sitemap
Widget updateEvery hourRefreshes dashboard widget data
Abandoned cart detectionEvery 15 minMarks carts as abandoned and triggers reminders
Flow runnerEvery 5 minExecutes pending automation flow actions
Flow cleanupDaily at 3:00Removes completed/expired flow execution records

Store sync cron (when online store connected)

TaskScheduleDescription
Fetch ordersEvery 10 minPulls new orders from connected store
Fetch customersEvery 30 minSyncs customer data from connected store
Update order statusesEvery 5 minPushes order status changes to connected store
Create productsEvery 30 minImports new products from connected store

Viewing cron configuration

To see what's currently installed:

php craft yui/cron/list

To uninstall cron jobs:

php craft yui/cron/uninstall

Manually running tasks

Most scheduled tasks can also be triggered manually via console commands. See Console Commands for the full list.

Gift card generation

Gift card batch generation runs as a queue job. If customers aren't receiving gift card PDFs, check the queue for failed generation jobs and inspect the error message.