ONLY THIS WEEK: 40% off Yearly/Lifetime membership! Read more here

Schedule regular shell commands

We can schedule regular shell commands within Laravel scheduled command

// app/Console/Kernel.php
 
class Kernel extends ConsoleKernel
{
protected function schedule(Schedule $schedule)
{
$schedule->exec('node /home/forge/script.js')->daily();
}
}

Tip given by @anwar_nairi

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 62 courses (1096 lessons, total 42 h 01 min)
  • 85 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord

Recent New Courses