Sorry for the late replay but I was running some tests on cronjobs.
It looks like Cronjob is working, in fact in the table `cron_schedule` I can see that there are some jobs scheduled and some which were executed fine http://prntscr.com/midbmq
That's why I got lost in this problem since I already checked with my hosting company, and they assured me that the cron job is working fine, in fact, I also receive an email every time a cronjob is run.
That's what it is troubling me that some jobs are working while others are not.
And I still can't figure out what is happening and why backups are not being scheduled.
Hello @robertbits ,
Please go to Cron Job Schedule List menu of extension and check message column those are pending or incomplete. You will get root cause of your issue.
Also, give me screenshot of cronjob configuration.
--
If my answer is useful, please Accept as Solution & give Kudos
In this link, you can see some of the Cron Jobs (http://prntscr.com/mk0cv5), among them, is the system_backup, which is enabled.
In the cron job schedule list, there are only 2 success and the rest are pending, but nothing in the message column (http://prntscr.com/mk0fjv).
also note that at the top under the title I have the error No cron execution found. which I don't know what it means.
this is a screenshot of the cron configuration on my hosting (http://prntscr.com/mk0iky)
Hello @robertbits ,
There is look like cron is not configured on server as well so we got this type issue, Please configure as below and let me know.
To setup cronjob on server, Please follow below steps
Please log in on the server by the terminal
Find the PHP binary and php.ini path
To display the path to your PHP binary, enter
$ which php
A sample result follows:
/usr/bin/php
Create the cron job
To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:
$ crontab -u <Magento file system owner username> -e
For example,
$ crontab -u magento_user -e
A text editor displays. (You might need to choose a text editor first.)
* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log * * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install dir>/var/log/update.cron.log * * * * * <path to php binary> <magento install dir>/bin/magento setup:cron:run >> <magento install dir>/var/log/setup.cron.log
where
The first command (magento cron:run) reindexes indexers, sends automated e-mails, generates the sitemap, and so on. Usually, it’s associated with the PHP command line .ini file. The other two commands are used by the Component Manager and System Upgrade
--
If my answer is useful, please Accept as Solution & give Kudos
when in SSH I tried to run this command: crontab -u magento_user -e
i got this error: -bash: crontab: command not found
I got the same error when I run crontab -l, which from I read it should give me a list of active cronjobs.
is this command crontab a function of magento 2.2 and how it works?
It looks like the problem has been solved. The last thing that I have done was changed some settings from Stores > Configuration > Advanced > System > Cron (Scheduled Tasks)
the settings where:
and I have changed:
now the backup is being created fine and other cron jobs are running.
I'd like to thank you @gelanivishal very much for your help with this problem since I really was confused about what was causing the problem.