For people who run a local WAMP server and their computer isn't always awake
I spent the past couple months figuring out what would work best.
First, set up your Kernel
class and console commands as instructed in the Laravel docs.
In Windows, open Task Scheduler, and create a new task:

In the Triggers section, you can set it like this:

The action should be to run the PHP executable within your WAMP folder (using artisan schedule:run
) as the argument:

But then here is an important difference from other tutorials I've seen:
For any tasks that are critical, you'll want to treat them separately.
For example, let's assume you have a task that backs up your database, and you'd like to run this every single day at noon, so your Kernel
class has this command in its schedule.
But then you realize a flaw in this approach: if you were out at lunch a few days in a row and left your computer asleep, that noon task would have been missed, and now your backups would be quite stale.
So, remove that daily database backups command from the schedule in Kernel
, and instead, then create a second task within Windows Task Scheduler, and set the trigger like:

Then in its Settings tab, you can choose "Run task as soon as possible after a scheduled start is missed":

Therefore, even if your computer is off or asleep at this task's scheduled time, Windows will know to run the task immediately upon waking.