How to setup scheduling on Laravel Forge

Setting up the Laravel artisan scheduler on Laravel forge for one of your apps can be a bit tricky, let me show you how to do it.

I struggled to figure this out myself, so here is a short tip on how to actually start the Laravel scheduler on Forge.

When setting up a new site on Laravel Forge you have to enter a domain name, so lets imagine that our site's domain name is mylaravelproject.com.

With this knowledge, head to the scheduler tab and insert the following in the "Command" input field. Notice how we reference our domain name in the command, this is the secret sauce.

php /home/forge/mylaravelproject.com/artisan schedule:run

Then set how often you want the scheduler to run and click "SCHEDULE JOB", and you are done.

Well done!