Setting custom times
Running getDueJobs()
without a parameter assumes the current time.
By specifying a DateTimeInterface
object, you can see the due jobs at a given point in time:
use DateTime;
$midnight = new DateTime("2019-03-21 00:00:00");
$jobsDueAtMidnight = $cron->getDueJobs($midnight);