1 | <?php |
||
7 | class Manager extends \Sid\Cron\Manager |
||
8 | { |
||
9 | /** |
||
10 | * For background jobs. |
||
11 | */ |
||
12 | protected $processes = []; |
||
13 | |||
14 | |||
15 | |||
16 | public function addCrontab(string $filename) |
||
26 | |||
27 | |||
28 | |||
29 | /** |
||
30 | * Run all due jobs in the foreground. |
||
31 | */ |
||
32 | public function runInForeground(DateTime $now = null) : array |
||
44 | |||
45 | /** |
||
46 | * Run all due jobs in the background. |
||
47 | */ |
||
48 | public function runInBackground(DateTime $now = null) : array |
||
58 | |||
59 | |||
60 | |||
61 | /** |
||
62 | * Wait for all jobs running in the background to finish. |
||
63 | */ |
||
64 | public function wait() |
||
70 | |||
71 | |||
72 | |||
73 | /** |
||
74 | * Terminate all jobs running in the background. |
||
75 | */ |
||
76 | public function terminate() |
||
82 | |||
83 | /** |
||
84 | * Kill all jobs running in the background. |
||
85 | */ |
||
86 | public function kill() |
||
92 | } |
||
93 |