Bonus System

Scheduled Tasks/ Cronjobs

Some features run in the background. For them to be executed, the Shopware worker or bin/console scheduled-task:run must be running in your installation — usually as a cronjob.

Scheduled tasks of the plugin

Both tasks are registered in Shopware automatically during installation and visible under Settings → System → Tasks. Normally no changes are needed.

Task Interval Function
prems_bonus_system.bonus_point_activation_task 1 hour Activates points whose activation condition is met — in particular the release n days after ordering.
prems_bonus_system.points_expiration_notification_task 1 hour Sends the Bonus points expiration notification mail to customers whose points expire in n days.

The matching settings are in the configuration under Point activation and Point expiration.

The release after n days and the expiration check also run when a customer logs in. Without running scheduled tasks points are therefore processed later, but not incorrectly — the expiration e-mail, however, is not sent at all.

Console commands

Check for expired points

Removes points that expired according to the setting Bonus point expires after days. The command is suited for its own cronjob, for example once per night.

bin/console prems:bonus-system:set-expired-points

Import points from a legacy system

Reads the table prems_bonus_system_import_point and writes the points to the customer accounts. Details under Migration of points.

bin/console prems:bonus-system:import-points-from-db-table

Recalculate point balances

Recalculates the balance from the sum of all bookings. Without the --force option the command only reports the differences.

bin/console prems:bonus-system:recalculate-points

Only use this command if the sum of the bookings really differs from the point account — normally that does not happen. Never run it after migrating points from Shopware 5, because the migrated points would be lost. Always test it on a staging system first.