Integrating SQLSRV Module in ProcessMaker
To ensure proper integration of the SQLSRV module in ProcessMaker, see the example: PHP Executor with the SQLSRV Module.
Configure Crontab to Run Every Minute
Configure the system crontab to run Laravel’s scheduler once per minute. This ensures scheduled tasks execute consistently and helps prevent duplicate executions.
Enter the following command:
* * * * * php artisan schedule:run
Why This Matters
Running php artisan schedule:run more frequently (e.g., every 30 seconds) can lead to unintended duplicate executions of scheduled tasks, such as dispatchDueReports, resulting in inconsistent behavior and potential performance issues.
Implementation Notes
Correct Interval: Ensure crontab is not configured to run more often than every minute.
Validation Logic (Optional): Within task logic like
dispatchDueReports, include safeguards usingisDue()or similar validation to confirm that the task has not already been executed within the current minute.System Alerts (Optional): Consider implementing alerts or validation rules to notify administrators if crontab is misconfigured.
Testing (Optional): Introduce unit or integration tests to simulate rapid scheduler invocations and validate correct execution behavior.
Applies To
All environments running Laravel scheduled tasks via crontab, including ProcessMaker Platform installations.