| 1 | <?php |
||
| 7 | class Manager extends \Sid\Cron\Manager |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * For background jobs. |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $processes = []; |
||
| 15 | |||
| 16 | |||
| 17 | |||
| 18 | public function addCrontab(string $filename) |
||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | /** |
||
| 32 | * Run all due jobs in the foreground. |
||
| 33 | */ |
||
| 34 | public function runInForeground(DateTime $now = null) : array |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Run all due jobs in the background. |
||
| 49 | */ |
||
| 50 | public function runInBackground(DateTime $now = null) : array |
||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | /** |
||
| 64 | * Wait for all jobs running in the background to finish. |
||
| 65 | */ |
||
| 66 | public function wait() |
||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | /** |
||
| 76 | * Terminate all jobs running in the background. |
||
| 77 | */ |
||
| 78 | public function terminate() |
||
| 84 | |||
| 85 | /** |
||
| 86 | * Kill all jobs running in the background. |
||
| 87 | */ |
||
| 88 | public function kill() |
||
| 94 | } |
||
| 95 |