Ad

Laravel Forge Scheduler - Run Command

- 1 answer

When using Laravel Forge's scheduler, you can trigger all the cronjob by e.g. running:

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".

Via SSH, I would execute the command like this:

ssh to the server
cd path/
php artisan command:name

So how would I declare it in Laravel Forge's scheduler?

php /home/forge/default/artisan command:name

Does not work.

Ad

Answer

The solution is simply to remove the slash after /path/artisan - it is /path artisan.

Ad
source: stackoverflow.com
Ad