Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Nikhil_46's avatar

Create CRON JOBS In Laravel On Hostinger HPanel

Hello,

I Am Creating First Time Cron Jobs In Laravel But I Am Not Able To Run It Properly, I Have View The Official Documentation Also, But I Am Using Hostinger HPanel And I Am Not Able Config It Properly

Can Anyone Help Me In This, What Will The Best Way To Get This Thing Done?

0 likes
2 replies
digitalbart's avatar

I would setup the scheduler first: https://support.hostinger.com/en/articles/1583465-how-to-set-up-a-cron-job-at-hostinger

* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

once that is setup, you can make a command and then run your command:

// Run hourly from 8 AM to 5 PM on weekdays...
$schedule->command('foo')
          ->weekdays()
          ->hourly()
          ->timezone('America/Chicago')
          ->between('8:00', '17:00');

Example Laracast lesson: https://laracasts.com/series/intermediate-laravel/episodes/1

Please or to participate in this conversation.