Crunz version: 3.0.1
PHP version: 7.4.24
Operating system type and version: Ubuntu
Description
Force-running a schedule (schedule:run -f -t1) ignores the Schedule's error handler.
To reproduce
<?php
$sch = new Crunz\Schedule();
$sch->onError(function () {}); // will *not* be called
$sch->run(function () {};
return $sch;
Possible Solution
ScheduleRunCommand:115 seems to be the culprit. Before that section, $schedules[0] has the error handler closure. Afterwards, it's gone.
Crunz version: 3.0.1
PHP version: 7.4.24
Operating system type and version: Ubuntu
Description
Force-running a schedule (
schedule:run -f -t1) ignores theSchedule's error handler.To reproduce
Possible Solution
ScheduleRunCommand:115seems to be the culprit. Before that section,$schedules[0]has the error handler closure. Afterwards, it's gone.