I use laravel's command and task scheduling to check shared online 3D printers's status. I use below code to start the scheduling task to check the device status every 10 minutes. But I want to remove the scheduling task when the printer is off line.
$schedule->command(DeviceCheckCommand::class, ['--force'])->everyTenMinutes();
I've read the laravel doc Task Scheduling entirely, but I cannot find any info about how to remove a scheduling task.