> For the complete documentation index, see [llms.txt](https://docs.intrepidcs.com/vspy-3-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intrepidcs.com/vspy-3-documentation/3.9.13/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-diag-job-action.md).

# Script Type Function Block Command: Diag Job Action

### Command Description

The **Diag Job Action** command allows a function block script to control diagnostic jobs created in the [Diagnostics](/vspy-3-documentation/3.9.13/vehicle-spy-main-menus/main-menu-spy-networks/diagnostics/diagnostics-view.md) feature of Vehicle Spy.

### Value Field Parameters

Double-click in the **Value** field to bring up a dialog box to set command parameters (Figure 1). There are two parameters to select: the action to take and the diagnostic job to work with.

![Figure 1: Parameter dialog box for the Diag Job Action function block script command.](https://content.gitbook.com/content/jb1RvXgxzxcqgZdVpbGb/blobs/Kb9pHtEhRVVk2Xh2Ec9c/spyFBCmdDJA.gif)

### Action

Specifies the action that the script should take:

* **Start:** Start the selected diagnostic job if it is not running.
* **Wait Until Complete:** Pause the function block at this step until the diagnostic job is finished.
* **Save:** Save the data collected by the diagnostic job.
* **Stop:** Stop the selected diagnostic job if it is currently running.
* **Call:** Start the diagnostic job and then wait until it is finished. (This combines the **Start** and **Wait Until Complete** actions.)

### Diag Job

Allows you to select the diagnostic job that this command should act upon. The diagnostic jobs in the current Vehicle Spy setup will be listed in the white box; simply click on the one you want and then press the **OK** button.\
\
The **Find** box allows you to more easily locate the right job in large setups. Type a string in the box to filter the list of diagnostic jobs shown in the selection box, so that only those that match the entered string appear. Press **Clear** to resume showing all diagnostic jobs again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.intrepidcs.com/vspy-3-documentation/3.9.13/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-diag-job-action.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
