Skip to content

Commit

Permalink
change the order of cron tasks
Browse files Browse the repository at this point in the history
it seems the actionSendPasswordExpiryEmails task is failing without any logged errors
  • Loading branch information
briskt committed Jan 31, 2025
1 parent f23ac7b commit f1caff5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions application/console/controllers/CronController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -86,17 +86,20 @@ public function actionAll()
'actionSendAbandonedUsersEmail',
'actionSendDelayedMfaRelatedEmails',
'actionSendMethodReminderEmails',
'actionSendPasswordExpiryEmails',
'actionSyncExternalGroups',
];

if (\Yii::$app->params['google']['enableSheetsExport']) {
$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());
}
Expand Down

0 comments on commit f1caff5

Please sign in to comment.