Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ycsm's avatar
Level 1

Scheduling tasks on laravel forge

Hello all.

I've been struggling for an hour or so to setup schedules on laravel to work on forge.

I've setup the cron on forge (I believe this is correct but I am not sure)

http://i.imgur.com/SR31MfD.png

I then have my schedule code:

$schedule->command('db:backup')->everyMinute();

This works when I run the command manually, but I cannot get it to work via scheduling.

Is there something I'm missing here?

0 likes
4 replies
andyabihaidar's avatar

Can you try running the php /home/forge/default/artisan schedule:run command manually in your terminal? Just to double check that the paths & the php bin are correct.

1 like
ycsm's avatar
Level 1

Thanks Andy, I'm getting the following: Could not open input file: /home/forge/default/artisan

andyabihaidar's avatar
Level 3

There you go then. You're not pointing to the right folder. You need to find the location of your Laravel installation and do that. Usually it's /home/forge/<domain-name>/artisan

1 like
ycsm's avatar
Level 1

Now I feel stupid! It's working, thank you so much Andy

Please or to participate in this conversation.