diff --git a/src/GO/Scheduler.php b/src/GO/Scheduler.php index 22df990..0c5fba6 100644 --- a/src/GO/Scheduler.php +++ b/src/GO/Scheduler.php @@ -310,10 +310,15 @@ public function clearJobs() return $this; } - public function work($interval = [0]) + /** + * Start a worker. + * + * @param array $seconds - When the scheduler should run + */ + public function work(array $seconds = [0]) { while (true) { - if (in_array((int) date('s'), $interval)) { + if (in_array((int) date('s'), $seconds)) { $this->run(); sleep(1); }