[英]Laravel Forge Scheduler - Run Command
When using Laravel Forge's scheduler, you can trigger all the cronjob by eg running: 使用Laravel Forge的调度程序时,您可以通过运行以下命令触发所有cronjob:
php /home/forge/default/artisan schedule:run
However, when wanting to execute a sole command, it will fail and says "fatal: not a git repository (or any of the parent directories): .git". 但是,当要执行一个命令时,它将失败并显示“致命:不是git存储库(或任何父目录):. git”。
Via SSH, I would execute the command like this: 通过SSH,我将执行以下命令:
ssh to the server
cd path/
php artisan command:name
So how would I declare it in Laravel Forge's scheduler? 那么我如何在Laravel Forge的调度程序中声明它?
php /home/forge/default/artisan command:name
Does not work. 不起作用。
解决方案是简单地删除/path/artisan
之后的斜杠-它是/path
artisan。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.