yes they should run once per day, and running it on forge should make no difference
so locally, if you run php artisan schedule:run it should only run the two invoices jobs unless it happens to be exactly 3am
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello
I'm having some trouble using forge scheduler vs laravel scheduler
In my Laravel project, I have defined some jobs like this:
protected function schedule(Schedule $schedule)
{
//$schedule->job(new \App\Domains\Works\Jobs\NotifyMissingDiary())->dailyAt("03:00");
$schedule->job(new InvoicesExpiredJob)->everyMinute();
$schedule->job(new InvoicesExpiringJob)->everyMinute();
// -------------------------------------------------------
$schedule->job(new DiariesToApprove)->dailyAt("03:00");
$schedule->job(new DiariesToDo)->dailyAt("03:00");
$schedule->job(new DashboardWorksData)->dailyAt("03:00");
$schedule->job(new DashboardMORendimentoData)->dailyAt("03:00");
$schedule->job(new DashboardUORendimentoData)->dailyAt("03:00");
// -------------------------------------------------------
}
The first two (InvoicesExpiredJob, InvoicesExpiringJob) are ok. I want them to run every minute. The other jobs I just need them to start every day at 3 AM. But thats the only time they should run. At 3AM each day
At forge, I scheduled a job to run every minute.
As I understand, each minute forge will check if there's a job to run, an runs that job The first two, as I said before, are running ok.
But why are the others also running? Shouldn't they be running just one time at 3 AM each day?
@snapey Can you explain me whats the difference? I'm sorry to ask, but I cant understand the difference. The time is the same
$schedule->job(new DiariesToDo)->dailyAt('15:15');
VS
$schedule->call(function () {
new DiariesToDo();
})->dailyAt('15:15');
The first one is sending minute by minute with forge execution...
The second is sending just at the time I asked for (15.15h) one per day as I want.
Why the first is not working?
Please or to participate in this conversation.