使用任务计划的方式运行laravel异步或者任务bug

任务计划的方式运行horizon没问题,但是运行php /www/sites/dev/index/artisan schedule:work就会报错,进容器里直接执行这个带路径的artisan命令也会报错。任务计划里面的脚本内容能不能执行多行命令或者 cd /www/sites/dev/index/ && php artisan schedule:work 一条命令搞定。

现在必须进入容器才能正常运行cd /www/sites/dev/index/ && php artisan schedule:work,使用任务计划的方式运行这段命令行直接报失败

// 这是任务计划直接运行报错内容
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan

可以尝试一下这种多命令的方式。