CRON Job failing - Calling unknown method - getHomeUrl()

Hi guys
I have moved to a new server and ever since moving, my daily CRON job isn’t working. Any advice appreciated as I am stuck…

When I run this below command in terminal, I get the below error with stacktrace.

Command Run: php yii timer/daily

Exception ‘yii\base\UnknownMethodException’ with message ‘Calling unknown method: yii\console\Application::getHomeUrl()’

in /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/Component.php:300

Stack trace:
#0 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/helpers/BaseUrl.php(363): yii\base\Component->__call(‘getHomeUrl’, Array)
#1 /home/serverAddress.com/appDirectory/public_html/common/mail/layouts/html.php(141): yii\helpers\BaseUrl::home()
#2 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/View.php(348): require(’/home/serverA…’)
#3 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile(’/home/serverA…’, Array)
#4 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile(’/home/serverA…’, Array, Object(extended\swiftmailer\Mailer))
#5 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/mail/BaseMailer.php(304): yii\base\View->render(‘layouts/html’, Array, Object(extended\swiftmailer\Mailer))
#6 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/mail/BaseMailer.php(188): yii\mail\BaseMailer->render(‘remind-html’, Array, ‘layouts/html’)
#7 /home/serverAddress.com/appDirectory/public_html/console/controllers/TimerController.php(57): yii\mail\BaseMailer->compose(Array, Array)
#8 [internal function]: console\controllers\TimerController->actionDaily()
#9 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#10 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams(Array)
#11 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/console/Controller.php(181): yii\base\Controller->runAction(‘daily’, Array)
#12 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction(‘daily’, Array)
#13 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction(‘timer/daily’, Array)
#14 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction(‘timer/daily’, Array)
#15 /home/serverAddress.com/appDirectory/public_html/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#16 /home/serverAddress.com/appDirectory/public_html/yii(40): yii\base\Application->run() #17 {main}

I am not sure how this was running before, but don’t believe console application has a Home URL function. There is of course Yii::$app->homeUrl in the web application.

Yes, you are correct - there was a hyperlink calling the wrong console item in the file that was running in the CRON. This has been corrected now and it is working.
Thanks!