Hi,
Magento version 2.2.3
I have scheduled a database backup to run everyday at 05:00am (putting the store in maintenance mode)
the cron job is the following:
/opt/plesk/php/7.0/bin/php /var/www/vhosts/domain.com/httpdocs/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/vhosts/domain.com/httpdocs/var/log/magento.cron.log
domain.com is replaced with my domain name.
The issue is that no backup is created, and the magento.cron.log is empty!
all other logs have no information regarding any failed backup attempts
How can I check what is wrong and why the backup is not running?
Regards
Solved! Go to Solution.
I have managed to debug it (run cron from within the plesk panel) and got error:
[Exception] Notice: Undefined index: jobs in /vendor/magento/module-cron/Model/Config/Converter/Db.php on line 39
So after some web search I found out that the cron was not running and not logging any errors.
The issue was that migration tool (migrated magento 1 to magento 2 store) has some bug when migrating cronjobs. It does not created the group for the cron.
example:
in core_config_data the path for cronjobs was 'crontab/jobs' instead of 'crontab/default/jobs' (default is the group).
After deleting the wrong 'crontab/jobs' entries, cron is working fine and backup was created automaticaly.
I hope this helps someone else too, or magento team can check it an fix migration tool issue.
Also a system/module to check if cron is running fine or not would be nice!
regards
have you checked your cron is running or not.
please check cron status by calling below way from SSH,
php bin/magento cron:run crontab -l
I have managed to debug it (run cron from within the plesk panel) and got error:
[Exception] Notice: Undefined index: jobs in /vendor/magento/module-cron/Model/Config/Converter/Db.php on line 39
So after some web search I found out that the cron was not running and not logging any errors.
The issue was that migration tool (migrated magento 1 to magento 2 store) has some bug when migrating cronjobs. It does not created the group for the cron.
example:
in core_config_data the path for cronjobs was 'crontab/jobs' instead of 'crontab/default/jobs' (default is the group).
After deleting the wrong 'crontab/jobs' entries, cron is working fine and backup was created automaticaly.
I hope this helps someone else too, or magento team can check it an fix migration tool issue.
Also a system/module to check if cron is running fine or not would be nice!
regards