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

jgravois's avatar

Laravel Forge: Scheduled Artisan Commands not running

I am trying to figure out why the scheduled commands are running as scheduled. This is how it is set-up.

Scheduler Tab: https://share.getcloudapp.com/xQuYBy7G

Daemon Tab: https://share.getcloudapp.com/yAuZwd06

kernel.php

protected function schedule(Schedule $schedule)
    {
        $schedule->command('telescope:prune')->daily();
        $schedule->command('database:backup')->daily();
        $schedule->command('media-library:delete-old-temporary-uploads')->daily();

        $schedule->command('uam:troll-sales-day')
            ->timezone('UTC')
            ->weekdays()
            ->everyFiveMinutes()
            ->environments('production');

        $schedule->command('uam:troll-shipments')
            ->weekdays()
            ->everyMinute()
            ->environments('production');

        $schedule->command('uam:troll-quotes')
            ->weekdays()
            ->everyThirtyMinutes()
            ->environments('production');

        $schedule->command('uam:troll-project-totals')
            ->weekdays()
            ->everyThirtyMinutes()
            ->environments('production');

        $schedule->command('uam:troll-lot-parts-sold')
            ->weekdays()
            ->everyThirtyMinutes()
            ->environments('production');
    }
0 likes
12 replies
jgravois's avatar

I thought the setup was per documentation which is why I am so confused.

At the end of each of those commands I write a last_run to my database and according to that table, they are only running when I manually trigger them

jgravois's avatar

In Forge if I click info next to the scheduled jobs on the scheduler tab I see this

Scheduled Job Log (795365)
×
Command: php home/forge/www.my-uam.com/artisan schedule:run
cat: /home/forge/.forge/scheduled-795365.log: No such file or directory

No errors though

jgravois's avatar

I did and I get the same message

Command: php home/forge/www.my-uam.com/artisan schedule:run
cat: /home/forge/.forge/scheduled-795365.log: No such file or directory
bugsysha's avatar

Strange. I do not have that error where it says cat: /home/forge/.forge/scheduled-795365.log: No such file or directory.

bugsysha's avatar

I guess you can. Just make sure that it has same permissions and owners as other files.

jgravois's avatar

It actually does exist .. Forge is just lying

-rw-rw-r--  1 forge forge       61 Jan 21 15:43 scheduled-795365.log
jgravois's avatar

I got it ... thanks for the help

the command was missing the '/' in front of /home/forge/www.my-uam.com/artisan

raf_'s avatar

This works for me! go project path and run the artisan command

cd /home/forge/default && php artisan schedule:run

Please or to participate in this conversation.