# Question - Daily cron failures

**URL:** https://discussions.eramba.org/t/question-daily-cron-failures/1680
**Category:** Forum - Software
**Created:** [September 28, 2020, 12:23pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680 "2020-09-28T12:23:21Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![james.sharpe](https://discussions.eramba.org/user_avatar/discussions.eramba.org/james.sharpe/32/557_2.png) [@james.sharpe](https://discussions.eramba.org/u/james.sharpe)
#### Post date: [September 28, 2020, 12:23pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/1 "2020-09-28T12:23:21Z")

</div>

If for whatever reason the daily cron fails to run then daily cron will never complete successfully in future runs because the AutoUpdateCron job checks system health which is red due to the previously missed daily cron. Only way to get around this is to manually update the cron database record to fake a pass.

Starting Cron Task - AutoUpdateCron  
2020-09-28 12:06:45 Error: [CronException] Since there seem to be system errors (on the linux system were this eramba runs) we cant let you update the system. Visit the [System Health](https://discussions.eramba.org/settings/systemHealth) page check for details on what could be wrong.  
Stack Trace:  
#0 /var/www/html/app/Lib/AutoUpdateLib.php(185): AutoUpdateLib-\>setError(‘Since there see…’)  
#1 /var/www/html/app/Lib/AutoUpdateLib.php(196): AutoUpdateLib-\>checkSystemHealth()  
#2 /var/www/html/app/Controller/Crud/Listener/AutoUpdateCronListener.php(32): AutoUpdateLib-\>check(Object(stdClass))  
#3 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(293): AutoUpdateCronListener-\>daily(Object(CakeEvent))  
#4 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(206): CronShell-\>\_executeTask(‘daily’, ‘AutoUpdateCronL…’, ‘18113’)  
#5 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(140): CronShell-\>\_runTasks(‘daily’, ‘18113’)  
#6 /var/www/html/app/Module/Cron/Console/Command/CronShell.php(103): CronShell-\>\_job(‘daily’)  
#7 /var/www/html/lib/Cake/Console/Shell.php(459): CronShell-\>job()  
#8 /var/www/html/lib/Cake/Console/ShellDispatcher.php(222): Shell-\>runCommand(‘job’, Array)  
#9 /var/www/html/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher-\>dispatch()  
#10 /var/www/html/app/Console/cake.php(37): ShellDispatcher::run(Array)  
#11 {main}  
Task: AutoUpdateCron  
Status: Error  
Message: CRON task “AutoUpdateCron” failed to process with error: Since there seem to be system errors (on the linux system were this eramba runs) we cant let you update the system. Visit the [System Health](https://discussions.eramba.org/settings/systemHealth) page check for details on what could be wrong.

---

<div class="post-metadata">

### Author: ![sam](https://discussions.eramba.org/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://discussions.eramba.org/u/sam)
#### Post date: [September 28, 2020, 12:33pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/2 "2020-09-28T12:33:51Z")

</div>

Can you try to run system health command?  
 ![image](https://discussions.eramba.org/uploads/default/original/2X/5/5251820a59055755d851dc795aabe7f51134b6e9.png)  
Is it possible that your php.ini files for cli and apache are not the same?

---

<div class="post-metadata">

### Author: ![james.sharpe](https://discussions.eramba.org/user_avatar/discussions.eramba.org/james.sharpe/32/557_2.png) [@james.sharpe](https://discussions.eramba.org/u/james.sharpe)
#### Post date: [September 28, 2020, 12:45pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/3 "2020-09-28T12:45:10Z")

</div>

The first test passes OK.

The second reports max\_execution\_time isn’t set correctly but this is expected as php cli sets max\_execution\_time to 0.  
The only other error is the fact that daily cron hasn’t run.

---

<div class="post-metadata">

### Author: ![james.sharpe](https://discussions.eramba.org/user_avatar/discussions.eramba.org/james.sharpe/32/557_2.png) [@james.sharpe](https://discussions.eramba.org/u/james.sharpe)
#### Post date: [September 28, 2020, 12:45pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/4 "2020-09-28T12:45:45Z")

</div>

The php.ini files are the same as I have the file in the app root and both apache and the CLI pick up the same php.ini file

---

<div class="post-metadata">

### Author: ![sam](https://discussions.eramba.org/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://discussions.eramba.org/u/sam)
#### Post date: [September 28, 2020, 12:51pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/5 "2020-09-28T12:51:18Z")

</div>

The problem is max execution time i think. On centos and Rhel php.ini are same for cli and apache but on ubuntu there are two of them. Daily cron is not checking itself, if it runs successfully it will just change state to OK.

---

<div class="post-metadata">

### Author: ![james.sharpe](https://discussions.eramba.org/user_avatar/discussions.eramba.org/james.sharpe/32/557_2.png) [@james.sharpe](https://discussions.eramba.org/u/james.sharpe)
#### Post date: [September 28, 2020, 12:58pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/6 "2020-09-28T12:58:24Z")

</div>

I’m running in the docker php-apache container which is based off Debian. From [https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time](https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time) you can see that when running from the CLI max\_execution\_time is 0. 0 is a special value which means unlimited so if you aren’t explicitly checking for this then your check will fail but this exact config has been running up until now so I don’t think its a php setting issue. It just happened to miss a run because of a misconfiguration on an AWS security group denying access to the database.

---

<div class="post-metadata">

### Author: ![kyle.gililland](https://discussions.eramba.org/letter_avatar_proxy/v4/letter/k/ccd318/32.png) [@kyle.gililland](https://discussions.eramba.org/u/kyle.gililland)
#### Post date: [September 30, 2020, 5:28pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/7 "2020-09-30T17:28:10Z")

</div>

I recently had this same issue and the cause was that Apache was using the incorrect version of PHP. Setting it to use the correct version solved the problem.

---

<div class="post-metadata">

### Author: ![Biman](https://discussions.eramba.org/letter_avatar_proxy/v4/letter/b/ee59a6/32.png) [@Biman](https://discussions.eramba.org/u/Biman)
#### Post date: [February 12, 2025, 8:36am UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/8 "2025-02-12T08:36:52Z")

</div>

There is no CLI directory .There in ubuntu we have only /etc/php/7.X/apacha2 directory it has php.ini file , so do i have to create in manually ,  
I’m using ubuntu 22.04 LTS

---

<div class="post-metadata">

### Author: ![david.schroth](https://discussions.eramba.org/letter_avatar_proxy/v4/letter/d/43a26b/32.png) [@david.schroth](https://discussions.eramba.org/u/david.schroth)
#### Post date: [February 12, 2025, 2:53pm UTC](https://discussions.eramba.org/t/question-daily-cron-failures/1680/9 "2025-02-12T14:53:38Z")

</div>

If you’re new to eramba, you’re likely using the Docker install method. This post is related to the source-install method that was deprecated a few years back.
