Schedule regular shell commands

We can schedule regular shell commands within Laravel scheduled command

1// app/Console/Kernel.php
2 
3class Kernel extends ConsoleKernel
4{
5 protected function shedule(Schedule $shedule)
6 {
7 $shedule->exec('node /home/forge/script.js')->daily();
8 }
9}

Tip given by @anwar_nairi

Like our articles?

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