From f1caff5d8c9465896fac440f1ba0e98ffdb0eafe Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Fri, 31 Jan 2025 10:06:58 +0800 Subject: [PATCH] change the order of cron tasks it seems the actionSendPasswordExpiryEmails task is failing without any logged errors --- application/console/controllers/CronController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/console/controllers/CronController.php b/application/console/controllers/CronController.php index 924c83e7..8ab1700c 100644 --- a/application/console/controllers/CronController.php +++ b/application/console/controllers/CronController.php @@ -2,12 +2,12 @@ namespace console\controllers; +use common\components\Emailer; use common\components\ExternalGroupsSync; use common\models\Invite; use common\models\Method; use common\models\Mfa; use common\models\User; -use common\components\Emailer; use yii\console\Controller; class CronController extends Controller @@ -86,7 +86,6 @@ public function actionAll() 'actionSendAbandonedUsersEmail', 'actionSendDelayedMfaRelatedEmails', 'actionSendMethodReminderEmails', - 'actionSendPasswordExpiryEmails', 'actionSyncExternalGroups', ]; @@ -94,9 +93,13 @@ public function actionAll() $actions[] = 'actionExportToSheets'; } + $actions[] = 'actionSendPasswordExpiryEmails'; + foreach ($actions as $action) { try { + \Yii::info(['msg' => 'starting task', 'task' => $action]); $this->$action(); + \Yii::info(['msg' => 'finished task', 'task' => $action]); } catch (\Throwable $e) { \Yii::error($e->getMessage()); }