Hello,
I’m fighting some cron issues on a brand-new install:
I can run the cron jobs manually inside the cron docker container but the scheduled tasks are failing.
root@bb20cf039020:/var/www/eramba# /bin/sh /var/www/eramba/app/upgrade/bin/cake queue run -v
[2024-06-24 11:50:12] Looking for Job ...
Running Job of type "Reports.Report"
2024-06-24 11:50:12 debug: ------
2024-06-24 11:50:12 debug: Report (id:29) initialized with model: `Dashboard.DashboardReports`, type `1`, params `[ 'user' => 'User::1', 'reportId' => (int) 29, 'dashboard' => true, 'preload' => true]`
2024-06-24 11:50:12 debug: Reports\Block\TextBlock (1071) initialized with config: `[ 'size' => '12']`
2024-06-24 11:50:12 debug: Reports\Block\TaskListBlock (1052) initialized with config: `[ 'size' => '4', 'type' => '2']`
2024-06-24 11:50:12 debug: Reports\Block\TaskListBlock (1067) initialized with config: `[ 'size' => '4', 'type' => '1']`
2024-06-24 11:50:12 debug: Reports\Block\TaskListBlock (1081) initialized with config: `[ 'size' => '4', 'type' => '3']`
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1075) initialized with config: `[ 'size' => '12', 'model' => 'Risks', 'chartId' => '16', 'visualisations' => '1']`
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1068) initialized with config: `[ 'size' => '12', 'model' => 'CompliancePackageRegulators', 'chartId' => '4', 'visualisations' => '1']`
2024-06-24 11:50:12 debug: Report (id:29) rendering
2024-06-24 11:50:12 debug: Reports\Block\TextBlock (1071) reading from cache
2024-06-24 11:50:12 debug: Reports\Block\TextBlock (1071) rendering
2024-06-24 11:50:12 debug: Reports\Block\TextBlock (1071) writing to cache
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1075) reading from cache
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1075) rendering
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1075) writing to cache
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1068) reading from cache
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1068) rendering
2024-06-24 11:50:12 debug: Reports\Block\ChartBlock (1068) writing to cache
Job Finished.
---------------------------------------------------------------
[2024-06-24 11:50:12] Looking for Job ...
nothing to do, sleeping.
^[---------------------------------------------------------------
[2024-06-24 11:50:22] Looking for Job ...
nothing to do, sleeping.
---------------------------------------------------------------
[2024-06-24 11:50:32] Looking for Job ...
nothing to do, sleeping.
\var\log\cron.log shows the following error:
su: invalid option -- 'v'
Try 'su --help' for more information.
su: invalid option -- 'v'
Try 'su --help' for more information.
crontab file:
@hourly export $(cat /var/www/docker.env) && /bin/sh /var/www/eramba/app/upgrade/bin/cake cron job hourly >> /var/log/cron.log 2>&1
@daily export $(cat /var/www/docker.env) && /bin/sh /var/www/eramba/app/upgrade/bin/cake cron job daily >> /var/log/cron.log 2>&1
@yearly export $(cat /var/www/docker.env) && /bin/sh /var/www/eramba/app/upgrade/bin/cake cron job yearly >> /var/log/cron.log 2>&1
* * * * * export $(cat /var/www/docker.env) && /bin/sh /var/www/eramba/app/upgrade/bin/cake queue run -v >> /var/log/cron.log 2>&1
## remember to end this file with an empty new line