Laravel 5.8 调度程序没有 运行 任何任务
Laravel 5.8 scheduler not running any tasks
好吧,我正在尝试 运行 我的调度程序,但它似乎什么也没做。
我创建了这个命令
$schedule = new Schedule();
$schedule->command("hello:test_command 5")
->cron("13 12 * * *") //should run at 12:13, used as test time
->sendOutputTo("test_data.txt");
我尝试了 运行 自动和手动设置调度程序,但是命令本身什么也没有...
当我 运行 scheduler:run 这就是我得到的
Running scheduled command: "C:\xampp_7\php\php.exe" "artisan" hello:test_command > "NUL" 2>&1
我 运行 在 windows 10 和 PHP 7.3 上使用它,如果它很重要的话。
此外,根本没有创建 test_data.txt。
编辑:加起来,经过一些测试,它似乎甚至没有将命令添加到计划中......
您是否在内核中安排此命令 class?它不能在这个文件之外使用。另外我认为你应该这样传递参数:
$schedule->command("hello:test_command --yourparam=5")
而不是:
$schedule->command("hello:test_command 5")
好吧,我正在尝试 运行 我的调度程序,但它似乎什么也没做。
我创建了这个命令
$schedule = new Schedule();
$schedule->command("hello:test_command 5")
->cron("13 12 * * *") //should run at 12:13, used as test time
->sendOutputTo("test_data.txt");
我尝试了 运行 自动和手动设置调度程序,但是命令本身什么也没有...
当我 运行 scheduler:run 这就是我得到的
Running scheduled command: "C:\xampp_7\php\php.exe" "artisan" hello:test_command > "NUL" 2>&1
我 运行 在 windows 10 和 PHP 7.3 上使用它,如果它很重要的话。
此外,根本没有创建 test_data.txt。
编辑:加起来,经过一些测试,它似乎甚至没有将命令添加到计划中......
您是否在内核中安排此命令 class?它不能在这个文件之外使用。另外我认为你应该这样传递参数:
$schedule->command("hello:test_command --yourparam=5")
而不是:
$schedule->command("hello:test_command 5")