yiisoft / yii2-app-advanced

Yii 2.0 Advanced Application Template
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
1.66k stars 1.28k forks source link

Unknown command: schedule/run #559

Closed acai2046 closed 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)
bizley commented 1 year ago

This is a 3rd party extension. Maybe you configured it wrong. Please direct all the issues regarding its usage there, thanks.