Skip to content

Running Jobs At A Custom Time

Sid Roberts edited this page Aug 18, 2019 · 2 revisions

You can see which Jobs are due at a particular time by passing a DateTime object to ->getDueJobs():

$datetime = new \DateTime("2015-01-01 00:00:00");

$cron->getDueJobs($datetime);

You can also pass a DateTime object to ->runInForeground()/->runInBackground() to run jobs due at that particular time.

$datetime = new \DateTime("2015-01-01 00:00:00");

$cron->runInBackground($datetime);
Clone this wiki locally