magento2: Cron.php not working
Preconditions (*)
- Magento 2.2.7
- php 7.1.16
Steps to reproduce (*)
According to https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html we configured the cron jobs. It will create three commands in the crontab.
#~ MAGENTO START
#* * * * */5 /usr/local/bin/php /var/www/html/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log
#* * * * */5 /usr/local/bin/php /var/www/html/update/cron.php >> /var/www/html/var/log/update.cron.log
#* * * * */5 /usr/local/bin/php /var/www/html/bin/magento setup:cron:run >> /var/www/html/var/log/setup.cron.log
#~ MAGENTO END
Expected result (*)
The crons works and no errors come.
Actual result (*)
The /usr/local/bin/php /var/www/html/update/cron.php is giving error.
Warning: require_once(/var/www/html/update/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/update/app/bootstrap.php on line 15
Fatal error: require_once(): Failed opening required '/var/www/html/update/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/html/update/app/bootstrap.php on line 15
Checked the update folder. There is not vendor folder. So, ran composer update. But that is also giving error message, as the php is not compatible.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ~5.5.0|~5.6.0|~7.0.0 but your PHP version (7.1.16) does not satisfy that requirement.
Problem 2
- Installation request for magento/composer 1.0.3 -> satisfiable by magento/composer[1.0.3].
- magento/composer 1.0.3 requires php ~5.5.0|~5.6.0|~7.0.0 -> your PHP version (7.1.16) does not satisfy that requirement.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 39 (18 by maintainers)
Hi @shikhamis11. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇
1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is validwill be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is validappears.2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Descriptionlabel to the issue by yourself.3. Add
Component: XXXXXlabel(s) to the ticket, indicating the components it may be related to.4. Verify that the issue is reproducible on
2.3-developbranchDetails
- Add the comment@magento-engcom-team give me 2.3-develop instanceto deploy test instance on Magento infrastructure.- If the issue is reproducible on
2.3-developbranch, please, add the labelReproduced on 2.3.x.- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
5. Verify that the issue is reproducible on
2.2-developbranch.Details
- Add the comment@magento-engcom-team give me 2.2-develop instanceto deploy test instance on Magento infrastructure.- If the issue is reproducible on
2.2-developbranch, please add the labelReproduced on 2.2.x6. Add label
Issue: Confirmedonce verification is complete.7. Make sure that automatic system confirms that report has been added to the backlog.