-
Notifications
You must be signed in to change notification settings - Fork 25
Foreground versus Background
Sid Roberts edited this page Aug 18, 2019
·
3 revisions
Running jobs in the foreground (sequential):
Job1 -------->
Job2 ----------------->
Job3 ---->
Running jobs in the background (parallel):
Job1 -------->
Job2 ----------------->
Job3 ---->
For most applications it is recommended to use ->runInBackground()
as this is typical of a Cron implementation and is often quicker.
If you specifically need to access the output of each Cron Job, use ->runInForeground()
.
->runInBackground()
returns an array of Process instances.
->runInForeground()
returns an array of outputs.
Licensed under the MIT License. © Sid Roberts