omnilight / yii2-scheduling

Scheduling extension for Yii2 framework
MIT License
317 stars 84 forks source link

Unknown command: schedule/run #77

Open acai2046 opened 1 year ago

acai2046 commented 1 year ago

What steps will reproduce the problem?

Unknown command: schedule/run Caused by: Exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "schedule/run".'

What's expected?

/console/config/schedule.php

`<?php use omnilight\scheduling\Schedule;

/**

@var Schedule $schedule
*/
$commandBathPath = Yii::getAlias('@app') . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'yii ';
if(YII_ENV_PROD) {
$schedule->exec($commandBathPath . 'spider/process-email-pic')->everyTenMinutes();
$schedule->exec($commandBathPath . 'email/send-from-queue')->everyNMinutes(2);
}`

Additional info

Q A
Yii version yii2-app-advanced
PHP version PHP version: 7.2.34
Operating system Welcome to Ubuntu 23.04 (GNU/Linux 6.2.0-32-generic x86_64)