You may want to run a daemon or service in the background during your jobs and find that the service isn't available after you've started it. You may be starting it as a background process which causes the run step to exit immediately after it's been started. Take the example of starting Elasticsearch below:
- run: ~/elasticsearch-2.4.3/bin/elasticsearch -d
This results in the step only being active for one second.
Once the process that started Elasticsearch background process exits successfully the step is considered finished, which ends the entire step.
By starting Elasticsearch in the foreground and using the background: true attribute of the run key our Elasticsearch process will stay active for the duration of the job.