#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

Setting Up Task Scheduling with schedule:run

Instead of configuring a separate cron entry for every recurring task, Laravel centralizes all scheduled work in one place and needs only a single cron entry to drive everything.

The One Cron Entry You Need

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

This runs every minute and lets Laravel decide internally which scheduled tasks are actually due to run at that moment.

Defining Scheduled Tasks

Scheduled tasks are defined in the schedule method of app/Console/Kernel.php (or in routes/console.php in newer Laravel versions).

protected function schedule(Schedule $schedule)
{
    $schedule->command('reports:generate')->daily();
}

Why This Design Is Useful

Understanding this single entry point makes it easier to see exactly how Laravel's scheduler relates to the underlying system crontab, which is covered next.

Ready to master Laravel Training Course?

Join Uncodemy's hands-on Laravel program and build real, production-ready applications.

Explore Course