Possible job double execution ?
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Expert
- Posts: 274
- Joined: 27 Jun 2019, 16:19
Possible job double execution ?
Hi community! I got a potential question.
On my shop I usually set cronjob like this:
it executes jobs each minute.
And question is: if some job started and it took more then 1 minute then the job will be started again ? And means double perform is possible, so some emails might be sent twice or something like this ?
Clarify this moment please, because I would not like to have such problems..
Thanks!
On my shop I usually set cronjob like this:
Code: Select all
* * * * * php /path/artisan aimeos:jobs "order/email/delivery order/email/payment order/email/voucher order/service/delivery"
And question is: if some job started and it took more then 1 minute then the job will be started again ? And means double perform is possible, so some emails might be sent twice or something like this ?
Clarify this moment please, because I would not like to have such problems..
Thanks!
Code: Select all
aimeos/ai-admin-jqadm 2019.10.6 Aimeos ai-admin-jqadm extension
aimeos/ai-admin-jsonadm 2019.10.2 Aimeos ai-admin-jsonadm extension
aimeos/ai-client-html 2019.10.10 Aimeos ai-client-html extension
aimeos/ai-client-jsonapi 2019.10.2 Aimeos JSON API extension
aimeos/ai-controller-frontend 2019.10.3 Aimeos ai-controller-frontend extension
aimeos/ai-controller-jobs 2019.10.4 Aimeos ai-controller-jobs extension
aimeos/ai-gettext 2019.10.1 Aimeos Gettext extension
aimeos/ai-laravel 2019.10.2 Laravel adapter for Aimeos web shops and e-commerce solutions
aimeos/ai-payments 2019.10.1 Payment extension for Aimeos web shops and e-commerce solutions
aimeos/ai-swiftmailer 2019.10.1 SwiftMailer adapter for Aimeos web shops and e-commerce solutions
aimeos/aimeos-core 2019.10.7 Full-featured e-commerce components for high performance online shops
aimeos/aimeos-laravel 2019.10.1 Professional, full-featured and high performance Laravel e-commerce package for online shops and complex B2B projects
Re: Possible job double execution ?
There may be a small chance because the processed orders are not locked and if the first cronjob needs very long, then the second one may send out e-mails that have been already process due to a race condition.
You can prevent that using techniques like described here:
https://bencane.com/2015/09/22/preventi ... xecutions/
You can prevent that using techniques like described here:
https://bencane.com/2015/09/22/preventi ... xecutions/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star