Skip to content

Scheduled tasks

Part of the module’s work happens without anybody’s involvement. All of it requires Shopware’s scheduled task processing to be running.

TaskFrequencyWhat it does
p2lab_stockly.back_in_stock.notification.generatorevery 5 minutessends back-in-stock notifications
p2lab_stockly.back_in_stock.subscription.checkerevery 6 hourstidies subscriptions
p2lab_stockly.rebalance_schedule_dispatchevery 5 minutesruns replenishment schedules
p2lab_stockly.task_progress_watchdogevery 5 minutesdetects background jobs whose worker died
p2lab_stockly.print_queue_watchdogevery 5 minutesreleases print jobs a station took but never confirmed
p2lab_stockly.report_cacheevery 2 hoursrecomputes report figures
p2lab_stockly.backorder_resourcinghourlylooks for cover for held orders
p2lab_stockly.transfer_demand_synchourlyreconciles transfer obligations
p2lab_stockly.threshold_planhourlyruns threshold plans that are due
p2lab_stockly.pick_wave_cleanuphourlyreleases waves nobody started, so their orders go back to the queue
p2lab_stockly.product_snapshotdailyrecords stock and price snapshots
p2lab_stockly.stock_integritydailyruns the integrity check
p2lab_stockly.stock_rebalancedailyrecomputes the replenishment plan between buildings
p2lab_stockly.product_affinitydailycomputes product affinity for bin suggestions
p2lab_stockly.resume_catch_updailycatches up on changes from a period the module was down
p2lab_stockly.external_write_digestdailysends the summary notification about external stock writes
p2lab_stockly.pack_capacitydailyworks out what each box has been seen to hold
p2lab_stockly.print_queue_cleanupdailyprunes finished print jobs
p2lab_stockly.api_log_cleanupdailyprunes the API logs
p2lab_stockly.sourcing_decision_cleanupdailyprunes the sourcing decision log
p2lab_stockly.threshold_run_cleanupweeklyprunes threshold run history
p2lab_stockly.zone_reclassificationweeklyrecomputes zone ABC classes
  • Back-in-stock notifications do not go out, even though the subscriptions exist.
  • Historical reports stay empty, because without snapshots there is nothing to build a trend from.
  • Replenishment schedules create no transfers.
  • Thresholds are not recomputed, so reorder suggestions work off stale values.
  • The integrity check finds no new drift.
  • Background jobs can still appear as running after their worker died, because nothing checks them.
Terminal window
bin/console scheduled-task:run
bin/console messenger:consume async low_priority

In production both should run as services. → Installation

A single task can be forced:

Terminal window
bin/console scheduled-task:run-single p2lab_stockly.stock_integrity

The effects of the tasks are visible in the background jobs, and the state of the scheduled tasks themselves in Shopware’s standard task list.