Laravel - Task Scheduling - Truth Test Constraints

The when method may be used to limit the execution of a task based on the result of a given truth test. In other words, if the given closure returns true, the task will execute as long as no other constraining conditions prevent the task from running:

    
    $schedule->command('emails:send')->daily()->when(function () {
        return true;
    });
	

The skip method may be seen as the inverse of when. If the skip method returns true, the scheduled task will not be executed:

    
    $schedule->command('emails:send')->daily()->skip(function () {
        return true;
    });
	

When using chained when methods, the scheduled command will only execute if all when conditions return true.