php - Laravel task scheduler not working for specified time range -


i have laravel 5 task scheduling run between specified time range every day:

$schedule->call(function () {              // task omitted         })->daily()->timezone('europe/london')->between('14:00', '15:00'); 

this not work, if change run every minute using everyminute(); run successfully:

       $schedule->call(function () {                   // task omitted         })->everyminute(); 

my cron on server set run every half hour it's shared hosting can't run less half hour:

0,30    *   *   *   *   /usr/local/bin/php -q /home/username/public_html/bookings/artisan schedule:run >> /dev/null 2>&1 

anyone know why first cron job: daily()->timezone('europe/london')->between('14:00', '15:00'); not running?

you have conflicting rule.

https://laravel.com/docs/5.5/scheduling

daily() sets task run daily @ midnight. between() limits task run between hours (basically secondary condition).

so between rule going make never runs since run @ midnight fail between condition.

use dailyat('14:00') instead of daily()->between()


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -