Skip to main content

Command#

Definition#

A Command consists of values that are used to execute a program within an operating system. A command typically starts with the name of the programming language to run, then the script name. At the end, you can provide the script with additional arguments to affect exactly how the script runs.

The following is an example of a command that runs a script written in Python.
python3 script_name.py all --columns name,id,time --split

Within the Shipyard platform, a Command is broken into distinct sections of the Program, the File to Run, and the Arguments.

Program#

The program field defines which installed package on Shipyard's operating system should be used to execute your code. The available options under program are based on the language that you select. This field is currently disabled with plans to support multiple language versions in the future.

python3

File to Run#

The File to Run field should relate to the single file that you want the selected program to execute. This field can include a directory structure if the file is located under a series of folders. Examples of common formatting:

script_name.py OR folder_a/script_name.py

Arguments#

Arguments are comprised of flags and values. The are added to the command in the order they are entered (although generally, the order should not matter).

all, --columns name id time & --split

We currently only accept arguments that have both a Flag and a single Value, as these more explicit.

If you have a valid use case for needing positional arguments or a boolean flag, please reach out to support.

caution

Command arguments are not suitable for secrets. They are available to change the behavior of your script with values that are not secret, like a file name to process or column names in a table to work with. For secrets, use environment variables.

Screenshots#

Additional Notes#

  1. Shipyard can only run a single command at a time. If multiple commands need to be run (with the use of &&), you should create and run a single shell script that contains the code to run multiple commands successively.
  2. Positional arguments that contain only values cannot be passed to your script.
  3. Boolean arguments that contain only flags cannot be passed to your script.