cancel
Showing results for 
Search instead for 
Did you mean: 

Cronjob's are not executing

SOLVED

Cronjob's are not executing

I have setup my cronjob's and I can not get them to execute.  I have installed webmin on my server and using the cron scheduler I can force each cronjob to run.  when I run php cron.php from my magento/install directory I don't get any errors but it still isn't running the cronjobs.  What am I missing?

 

Here are my cronjob's that I have setup


*/5 * * * 1 tar -zcf /var/backups/home.tgz /home/
*/1 * * * * /var/www/html/magento/bin/magento indexer:reindex #Reindexing all
*/1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/html/magento/bin/                                                                         magento cron:run > /var/www/html/magento/var/log/magento.cron.log&
*/1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/html/magento/upda                                                                         t cron.php > /var/www/html/magento/var/log/update.cron.log&
*/1 * * * * /usr/bin/php -c /etc/php5/apache2/php.ini /var/www/html/magento/bin/                                                                         magento setup:cron:run > /var/www/html/magento/var/log/setup.cron.log&
*/1 * * * * /var/www/html/magento/bin/magento cache:clean

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Cronjob's are not executing

Modifying the crontab.xml file in the magento install folder seamed to do the job.  I did a search for the crontab.xml files in the magento install folder and was able to adjust the time that they would run.

https://mage2.pro/t/topic/576  this link did help me find the folders I needed.

View solution in original post

6 REPLIES 6

Re: Cronjob's are not executing

Magento 2 uses an internal schedule for its cron jobs.

For example, see how can an extension schedule a cron job with a crontab.xml file: https://mage2.pro/t/576

System-wide sheduler is used only to check the internal schedule.

Re: Cronjob's are not executing

How do I use the internal scheduler?  I have been following the instructions in the the magento setup on how to install magento 2.

Re: Cronjob's are not executing

Modifying the crontab.xml file in the magento install folder seamed to do the job.  I did a search for the crontab.xml files in the magento install folder and was able to adjust the time that they would run.

https://mage2.pro/t/topic/576  this link did help me find the folders I needed.

Re: Cronjob's are not executing

The changes you have made will be overwritten by a Magento update.

 

Re: Cronjob's are not executing

So I will just have to modify my crontab.xml files again after updating or  is there something else I will need to do?

Re: Cronjob's are not executing

Magento internally merges all its configuration files into a single one, so I recommend to make your modifications in a separate extension's XML file, and it will be merged into the the composite configuration.