Difficulty: Beginner
Estimated Time: 10 minutes

When the scenario starts, additional commands can be executed in the foreground or background.

### Run Commands Automatically

Step 1 of 3

#### Step 1

Commands can be run automatically in the foreground and background when a scenario starts and when a step loads.

The index.json file contains the scenario structure.

Within the intro block and for each step, two files can be defined under courseData and code.

courseData defines a script which runs in the background.

code defines the commands to run in the foreground.

"intro": {
"text": "intro.md",
"courseData": "background.sh",
"code": "foreground.sh",
"credits": ""
}

When the user proceeds to the next step, additional scripts can be run.

Terminal