Record when a schedule last ran

schedule:list shows the next time. It does not store a last run. Write a timestamp from the command if the Vue page needs one.

For your AI agent

Copies a prompt. Paste it into the AI agent you already have open.

Read https://laravel-vuejs.space/laravel-schedule-last-run-vue.md
schedule:list shows the next time. It does not store a last run. Write a timestamp from the command if the Vue page needs one.
Do not scrape the scheduler's mutex and show it as the last success.
Do not run schedule:work from the Vue page.
Show the diff. Do not commit.
On this page · 3 sections
  1. The fix
  2. What to avoid
  3. FAQ

People searching “Laravel schedule last run” look for a column that does not exist. routes/console.php defines the schedule. php artisan schedule:list prints the next due time. The Vue page needs a row you write yourself if it must show “last ran”.

TL;DR

  • schedule:list shows the next time.
  • It does not store a last run.
  • Write a timestamp from the command if the Vue page needs one.
  • Do not scrape the scheduler’s mutex and show it as the last success.

Who it's for: Laravel + Vue developers

Applies to: Laravel 13 · Vue 3

The fix#

php
use Illuminate\Support\Facades\Schedule;

Schedule::command('reports:daily')->daily()->withoutOverlapping();

withoutOverlapping() uses the cache so a slow run is not started twice. It is not a history table.

Inside the command, after the work:

php
Cache::forever('reports.daily.last_run', now()->toIso8601String());

Share that string with an admin page. forever here means “until the next success overwrites it”, not “keep a history”.

What to avoid#

Gotcha

Do not scrape the scheduler’s mutex and show it as the last success. The mutex means “it is running or it crashed while holding the lock”. Do not run schedule:work from the Vue page. The system cron runs schedule:run every minute, or the platform does.

FAQ#

How do I record when a schedule last ran?

schedule:list shows the next time. It does not store a last run. Write a timestamp from the command if the Vue page needs one.

What goes wrong with Laravel schedule last run?

Many developers look for a column that does not exist. Do not scrape the scheduler's mutex and show it as the last success.

Found this useful?

Ask questions, share what you built.

Join thousands of Laravel and Vue developers in our Facebook group, or get new posts in your Telegram feed. Sharing this article helps too.

Keep reading

Newsletter

Get the best of Laravel & Vue, once a month.

One short email with new guides, release notes worth reading and hand-picked community links. No spam, unsubscribe any time.