# Run Program Task

The *Run Program* task is used to run an executable command or batch file as part of your workflow. The execution of certain tasks, such as a series of commands in other programming languages (e.g., Python/R), in the form of a .bat extension file, is performed through the *Run Program* task object.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2F3qTMRJBr0IziXfJHy4bT%2Fimage.png?alt=media&#x26;token=4e83e255-1757-44f2-a645-d6d46de5c01b" alt=""><figcaption></figcaption></figure>

To use a *Run Program* task:

1. Drag and drop the *Run Program* task object onto the workflow designer. Configure the object by right-clicking on the object’s header and selecting *Properties* from the context menu.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FPzoWsFFDyi2WC2LoYL9l%2Fimage.png?alt=media&#x26;token=f3d24ece-ef75-4a79-b2b9-ab72d7e56f94" alt=""><figcaption></figcaption></figure>

2. A *Run Program Properties* window will open, as shown below. This screen lets users define properties for an executable batch file.

<figure><img src="https://750977703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqHxyVNGb7tSdIWecl6Ru%2Fuploads%2FDPtjhHUJsd2kNLq2jVd0%2Fimage.png?alt=media&#x26;token=92035e58-1112-4f9d-af5b-cd31bbc7f4b4" alt=""><figcaption></figcaption></figure>

* *Program Path*: Specify the file path to the executable batch file that you want to run as part of the workflow.
* *Run In*: Specify the default folder where Astera will run the batch file. (**optional**)
* *Arguments*: Specify any required or optional arguments for running the batch file, such as providing an external input or indicating an input parameter change.
* *Run As*: Enter a user account (if different from the administrator) that should be used for running the batch file.
* *Password*: Enter the password specific to the user account entered in the *Run As* option.
* *Success Value*: A value returned by the executable batch file upon its successful completion. The default value is 0. The *Run Program* task will expect this value to signal the successful completion of the task.
* *Timeout*: Define a time after which, if the program task fails to execute, Astera will terminate the process.
* *Fail Action if Unsuccessful*: Check this option to return an error when the executable batch file ends with an error in the code.
* *Wait for Task to Complete*: Check this option to stop Astera from proceeding to the next task in the workflow until the batch file has finished running.
