File: //proc/1122/cwd/console/controllers/ReminderController.php
<?php
namespace console\controllers;
use common\services\ReminderDispatchService;
use yii\console\Controller;
use yii\console\ExitCode;
/**
* Send due client reminders (cron every minute).
*
* Example: * * * * * php /path/to/yii reminder/send-due
*/
class ReminderController extends Controller
{
public function actionSendDue(): int
{
$count = (new ReminderDispatchService())->sendDueReminders();
$this->stdout('Reminders sent: ' . $count . "\n");
return ExitCode::OK;
}
}