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.
The tasks
Section titled “The tasks”| Task | Frequency | What it does |
|---|---|---|
p2lab_stockly.back_in_stock.notification.generator | every 5 minutes | sends back-in-stock notifications |
p2lab_stockly.back_in_stock.subscription.checker | every 6 hours | tidies subscriptions |
p2lab_stockly.rebalance_schedule_dispatch | every 5 minutes | runs replenishment schedules |
p2lab_stockly.task_progress_watchdog | every 5 minutes | detects background jobs whose worker died |
p2lab_stockly.print_queue_watchdog | every 5 minutes | releases print jobs a station took but never confirmed |
p2lab_stockly.report_cache | every 2 hours | recomputes report figures |
p2lab_stockly.backorder_resourcing | hourly | looks for cover for held orders |
p2lab_stockly.transfer_demand_sync | hourly | reconciles transfer obligations |
p2lab_stockly.threshold_plan | hourly | runs threshold plans that are due |
p2lab_stockly.pick_wave_cleanup | hourly | releases waves nobody started, so their orders go back to the queue |
p2lab_stockly.product_snapshot | daily | records stock and price snapshots |
p2lab_stockly.stock_integrity | daily | runs the integrity check |
p2lab_stockly.stock_rebalance | daily | recomputes the replenishment plan between buildings |
p2lab_stockly.product_affinity | daily | computes product affinity for bin suggestions |
p2lab_stockly.resume_catch_up | daily | catches up on changes from a period the module was down |
p2lab_stockly.external_write_digest | daily | sends the summary notification about external stock writes |
p2lab_stockly.pack_capacity | daily | works out what each box has been seen to hold |
p2lab_stockly.print_queue_cleanup | daily | prunes finished print jobs |
p2lab_stockly.api_log_cleanup | daily | prunes the API logs |
p2lab_stockly.sourcing_decision_cleanup | daily | prunes the sourcing decision log |
p2lab_stockly.threshold_run_cleanup | weekly | prunes threshold run history |
p2lab_stockly.zone_reclassification | weekly | recomputes zone ABC classes |
What stops working without them
Section titled “What stops working without them”- 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.
Running them
Section titled “Running them”bin/console scheduled-task:runbin/console messenger:consume async low_priorityIn production both should run as services. → Installation
A single task can be forced:
bin/console scheduled-task:run-single p2lab_stockly.stock_integrityChecking the state
Section titled “Checking the state”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.