for some reason after upgrade from 2.3.3 to 2.3.4 cron stopped working
All files and configurations were OK. So after many cups of coffee. This is what it worked for me
A) remove the Magento crontab:
- Log in as or switch to the Magento file system owner.
- Change to the Magento installation directory.
Enter the following command:
$ bin/magento cron:remove
B) Change to the /var directory.
Remove the following files:
.setup_cronjob_status
.update_cronjob_status
any other file related to cron in this folder
C) So far magento now, does not have any cron job available nor any file attached to it
Now we create a new Magento crontab:
$ bin/magento cache:flush
$ bin/magento cron:install [Note you can use -f or --force but since we deleted is not necessary]
Now we check
$ crontab -l
It should show like
MAGENTO START c5f9e5ed71cceaabc4d4fd9b3e827a2b
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/magento2/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/update/cron.php >> /var/www/html/magento2/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/html/magento2/bin/magento setup:cron:run >> /var/www/html/magento2/var/log/setup.cron.log
MAGENTO END c5f9e5ed71cceaabc4d4fd9b3e827a2b
And now we run cron
$bin/magento cron:run
Now for those who do not like or does not have experience checking DB Tables (cron_schedule) table
The easiest way is goring to backend of magento
Admin->System->Index Management
It should be SET as
UPDATE BY SCHEDULE and
READY
If it works just Refresh the page 1 minute later and the Updated Date and time should change
Good Luck
PS: part was taking from here