'Laravel Task Scheduling Every X Hours

I undestand that you can create hourly tasks on Laravel by using:

$schedule->command('catalog:update')->hourly();

however is there a way to do for example every 2 hours or 5 hours? I couldn't find it on documentation or here.



Solution 1:[1]

From Laravel 7 By Defalut you can give like this

$schedule->command('catalog:update')->everyTwoHours();
$schedule->command('catalog:update')->everyFiveHours();

See Docs:https://laravel.com/docs/7.x/scheduling

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sai nani