We added the following lines to the crontab file to run magento cron every minute.
* * * * * / bin / php -c /etc/php.ini/home/ centos / public_html / staging / bin / magento cron: run> /home/centos/public_html/staging/var/log/magento.cron. log& * * * * * / bin / php -c /etc/php.ini /home/centos/public_html/staging/update/cron.php> /home/centos/public_html/staging/var/log/update.cron.log& * * * * * / bin / php -c /etc/php.ini/home/ centos / public_html / staging / bin / magento setup: cron: run> / home / centos / public_html / staging / var / log / setup. cron.log &
We have created the cron job for our module under the default magento group, which must be run every 30 minutes.
* / 30 * * * *
But when we checked in the cron_schedule table and in our logs, the cron job was completed after a minute without running it completely. Please refer to the screenshot below: –
We tried to use flock in crontab, checked the server timings but nothing worked.
Please, give your opinion. Thank you.