Laravel Forge 调度程序 - 运行 命令
Laravel Forge Scheduler - Run Command
当使用 Laravel Forge 的调度程序时,您可以触发所有的 cronjob,例如运行:
php /home/forge/default/artisan schedule:run
但是,当想执行一个单独的命令时,它会失败并显示"fatal: not a git repository (or any of the parent directories): .git"。
通过 SSH,我将执行如下命令:
ssh to the server
cd path/
php artisan command:name
那么我如何在 Laravel Forge 的调度程序中声明它?
php /home/forge/default/artisan command:name
无效。
解决方案是简单地删除 /path/artisan
之后的斜杠 - 它是 /path
artisan。
当使用 Laravel Forge 的调度程序时,您可以触发所有的 cronjob,例如运行:
php /home/forge/default/artisan schedule:run
但是,当想执行一个单独的命令时,它会失败并显示"fatal: not a git repository (or any of the parent directories): .git"。
通过 SSH,我将执行如下命令:
ssh to the server
cd path/
php artisan command:name
那么我如何在 Laravel Forge 的调度程序中声明它?
php /home/forge/default/artisan command:name
无效。
解决方案是简单地删除 /path/artisan
之后的斜杠 - 它是 /path
artisan。