Configuration Options
After installing the plugin via the Shopware Store, you can configure the following settings:
General Settings
Notification Email Addresses
- Setting:email
- Description: Enter one or more email addresses to receive notifications. Separate multiple email addresses with commas. Leave this field empty to disable notifications.
- Example:admin@example.com, support@example.com
Enable Task Status Fix
- Setting:enableTaskStatusUpdate
- Description: Enable or disable the automatic update of the task status to "scheduled" after notification.
- Default Value:true
Enable Scheduled Task (Instead of Command / System Cronjob)
- Setting:enableScheduledTask
- Description: Enable or disable the scheduled task to run the monitoring. Alternatively, you can register a system cronjob to run the command bin/console fgits:scheduler.
- Default Value:true
Task Grace Period (in Seconds)
- Setting:executionThreshold
- Description: Tasks being stuck longer than this amount of time will be automatically restarted.
- Default Value:7200 (2 hours)
Ignored Task Names
- Setting:ignoredTaskNames
- Description: Enter the names of tasks to ignore, separated by commas.
- Example:taskName1, taskName2
Plugin Logic
The plugin monitors scheduled tasks and checks if a task requires attention based on the following logic:
When is a Task Considered?
- Not Considered:
- If the task status is SKIPPED or INACTIVE.
- Considered:
- If the task status is FAILED.
- If the task status is QUEUED or RUNNING and the task remains in this status longer than the configured grace period (executionThreshold).
- If the task has missed its scheduled execution time by more than the configured grace period.
Running the Plugin
The plugin can be run either via the included scheduled task or via the Shopware command bin/console fgits:scheduler.
System Cronjob Recommendation
To ensure notifications are sent even if the scheduler has completely failed, we recommend setting up the command as a system cronjob and running it at least every 15 minutes.
Example Cron Expression
To run the command bin/console fgits:scheduler every 15 minutes, add the following line to your crontab:
*/15 * * * * /path/to/shopware/bin/console fgits:scheduler
Replace /path/to/shopware/ with the actual path to your Shopware installation.
With these configuration options and settings, you can ensure that all scheduled tasks in your Shopware 6 installation are reliably monitored and that you receive immediate notifications in case of any issues.