Introduction
- The JS7 offers to perform operations on orders of the Daily Plan and related objects by the JS7 - REST Web Service API.
- For detailed information see the Technical Documentation of the REST Web Service API.
- For available CLI operations see JS7 - Unix Shell Command Line Interface.
- The REST Web Service API can be accessed from Shell utilities such as
curl
. - In addition, a PowerShell module is available for simplified access to the REST Web Service API. This is described in the JS7 - PowerShell Module article.
The Daily Plan Operation Script offered for Unix Shell can be applied to perform frequently used status operations on orders of the Daily Plan.
The script is applied to orders created from schedules for the Daily Plan, it is not applicable to ad hoc orders added by users.
Workflow Operation Script
Command | Object | Documentation |
---|---|---|
get-order / submit-order / cancel-order / delete-order | Order | |
generate-order | ||
copy-order / modify-order | ||
delete-submission | Submission | |
get-pro-calendar / get-pro-date / create-pro | Projection |
The script is offered for download and can be applied for frequently used operations on workflows, jobs and orders:
- The script is available for Linux and MacOS® using bash shell.
- The script terminates with exit code 0 to signal successful execution, with exit code 1 for command line argument errors and with exit code 4 for non-recoverable errors. Exit code 3 signals that no matching objects have been found.
- The script is intended as a baseline example for customization by JS7 users and by SOS within the scope of professional services. Examples make use of JS7 Release 2.7.4, bash 4.2, curl 7.29.0 and jq 1.6.0.
Prerequisites
The Script requires the curl utility and the jq utility to be available from the operating system.
jq ships with the MIT license, see https://opensource.org/licenses/MIT.
Download
Download: JS7 - Download (Section: Unix Shell ClI)
Usage
Invoking the script without arguments displays the usage clause:
Usage: operate-daily-plan.sh [Command] [Options] [Switches] Commands: get-order [--date-from] [--date-to] [--order-id] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--late] [--state] submit-order [--date-from] [--date-to] [--order-id] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] cancel-order [--date-from] [--date-to] [--order-id] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--late] delete-order [--date-from] [--date-to] [--order-id] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--late] generate-order --date-from [--submit] [--overwrite] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--non-auto-plan] copy-order [--date-from] [--date-to] [--order-id] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--stick-to-plan] --scheduled-for [--time-zone] [--cycle] [--force] modify-order [--date-from] [--date-to] [--order-id] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--stick-to-plan] [--scheduled-for] [--time-zone] [--cycle] [--variable] [--remove-variable] [--start-position] [--block-position] [--end-position] [--force] delete-submission --date-from [--date-to] get-pro-calendar --date-from [--date-to] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--no-start-time] get-pro-date --date-from [--date-to] [--schedule] [--workflow] [--schedule-folder] [--workflow-folder] [--recursive] [--no-start-time] create-pro Options: --url=<url> | required: JOC Cockpit URL --controller-id=<id> | required: Controller ID --user=<account> | required: JOC Cockpit user account --password=<password> | optional: JOC Cockpit password --ca-cert=<path> | optional: path to CA Certificate used for JOC Cockpit login --client-cert=<path> | optional: path to Client Certificate used for login --client-key=<path> | optional: path to Client Key used for login --timeout=<seconds> | optional: timeout for request, default: 60 --block-position=<label> | optional: label for block instruction that holds start position --start-position=<label> | optional: label from which the order will be started --end-position=<label[,label]> | optional: list of labels before which the order will terminate --variable=<key=value[,key=value]> | optional: list of variables holding key/value pairs --date-from=<date> | optional: daily plan begin of date range --date-to=<date> | optional: daily plan end of date range --scheduled-for=<date|time|offset> | optional: order start date for copy-order, start time for modify-order --time-zone=<tz> | optional: time zone for dates, default: see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones --state=<state[,state]> | optional: list of states limiting orders to be processed such as PLANNED, SUBMITTED, FINISHED --schedule=<name[,name]> | optional: list of schedule names --schedule-folder=<path[,path]> | optional: list of folders holding schedules --workflow=<name[,name]> | optional: list of workflow names --workflow-folder=<path[,path]> | optional: list of folders holding workflows --order-id=<id[,id]> | optional: list of order identifiers --audit-message=<string> | optional: audit log message --audit-time-spent=<number> | optional: audit log time spent in minutes --audit-link=<url> | optional: audit log link --log-dir=<directory> | optional: path to directory holding the script's log files Switches: -h | --help | displays usage -v | --verbose | displays verbose output, repeat to increase verbosity -p | --password | asks for password -k | --key-password | asks for key password -r | --recursive | specifies folders to be looked up recursively -s | --submit | submits orders when used with the generate-order command -l | --late | includes late orders with get/cancel operations -i | --stick-to-plan | specifies to stick to the daily plan assignment -n | --non-auto-plan | includes schedules without automated planning -t | --no-start-time | inverts projections to return dates without start times -f | --force | specifies forced start of jobs ignoring admission times --show-logs | shows log output if --log-dir is used --make-dirs | creates directories if they do not exist see https://kb.sos-berlin.com/x/sQUeCw
Commands
get-order
- Returns orders from the Daily Plan. When used without options, then the current day's orders will be returned.
- A date range can be specified from the
--date-from
and--date-to
options that accept the yyyy-mm-dd date format. - Resulting orders are provided in JSON format.
submit-order
- Submits orders in the planned status to a Controller and Agents. When used without options, then the current day's orders will be submitted.
- After submission orders will be set to the submitted status.
cancel-order
- Cancels orders in the the submitted status from a Controller and Agents. When used without options, then the current day's orders will be cancelled.
- After cancellation orders will be set to the planned status.
delete-order
- Deletes orders in the the planned status from a Controller and Agents. When used without options, then the current day's orders will be deleted.
- Orders in the submitted status cannot be deleted, they have to be cancelled first using the
cancel-order
command. - Orders in the finished status cannot be deleted, they are history.
- Orders in the submitted status cannot be deleted, they have to be cancelled first using the
- Deleting all orders for a given date does not delete the daily plan. To this purpose the
delete-submission
command can be used.
- Deletes orders in the the planned status from a Controller and Agents. When used without options, then the current day's orders will be deleted.
generate-order
- Creates orders for the daily plan.
- When used with the
--overwrite
switch, then existing orders for the same schedules will be replaced and new orders will be added. - When used with the
--submit
switch, then orders will be submitted to the Controller and Agents. - When used with the
--non-auto-plan
switch, then orders will be created from schedules that are not configured for automated planning.
- When used with the
- When orders are added to the daily plan, then they will be set to the planned status unless the
--submit
switch is used that sets orders to the submitted status.
- Creates orders for the daily plan.
copy-order
- Copies orders from a previous daily plan date, date range or list of Order IDs to a future date.
- Use of the
--scheduled-for
option is required as it specifies the daily plan date and optionally time to which orders will be copied.--scheduled-for=2050-07-15
will preserve order start times when copying orders to the target date.--scheduled-for=2050-07-15T06:30:00
will start all copied orders for the same given date and time. Consider use of theT
character between date and time..
- If the
--time-zone
option is used then the--scheduled-for
date will be considered in the given time zone. - When used with the -
-stick-to-plan
switch, then copied orders will remain members of their original daily plan date. They will start for the new start time but will resolve JS7 - Daily Plan Dependencies to the original daily plan date. - Orders can be forced to start and to ignore JS7 - Admission Times for Jobs using the
--force
switch. - For cyclic orders by default the original cycle will be preserved. Users can specify the
--cycle
option to defines a cycle that will be applied to copied orders that hold cyclic start times.--cycle='{"begin": "00:00:00", "end": "20:00:00", "repeat": "00:30:00"}'
specifies a cycle from midnight to 8pm with a 30 minutes's interval.
- Use of the
- Copying orders from a date range will add all orders to the target date.
- The command will return the list of existing Order IDs and their mapping to newly created Order IDs in JSON format like this:
{
"#2025-07-14#P26757472840-pdsVariableBusinessDateSet": "#2025-07-29#P32195240717-pdsVariableBusinessDateSet",
"#2025-07-14#P26757472942-business-day-1": "#2025-07-29#P32195240718-business-day-1",
"#2025-07-14#P26757472031-pdCyclicSimpleWorkflowPeriodic": "#2025-07-29#P32195240610-pdCyclicSimpleWorkflowPeriodic",
"#2025-07-14#P26757471930-pdCyclicSimpleWorkflowContinuo": "#2025-07-29#P32195240609-pdCyclicSimpleWorkflowContinuo",
}
- Copies orders from a previous daily plan date, date range or list of Order IDs to a future date.
modify-order
- Modifies orders for a given daily plan date, date range or list of Order IDs.
- The
--scheduled-for
option can be used to modify the start time of orders.--scheduled-for=2050-07-15T06:30:00
will start orders for the given date and time. Consider use of theT
character between date and time..--scheduled-for=now
will start orders immediately.--scheduled-for=cur+02:00:00
will add two hours to the start time of orders.--scheduled-for=cur-05:00:00
will subtract five hours from the start time of orders.- When used with the -
-stick-to-plan
switch, then modified orders will remain members of their original daily plan date. They will start for the new start time but will resolve JS7 - Daily Plan Dependencies with their original daily plan date. If the switch is not used, then orders will be assigned the daily plan date according to the resulting start time.
- The
--variable
option can be used to specify order variables., i.e. key/value pairs.--variable="var1=22,var2=44,var3=hello"
specifies three variablesvar1
,var2
,var3
with related values.- Existing variables will be overwritten if specified with the
--variable
option.
- The
--remove-variable
option specifies the names of variables that should removed from orders. More than one variable can be specified using comma:--remove-variables=var1,var2
- Orders can be forced to start and to ignore JS7 - Admission Times for Jobs using the
--force
switch. - For cyclic orders users can specify the
--cycle
option that defines a cycle that will be applied to orders with cyclic start times.--cycle='{"begin": "00:00:00", "end": "20:00:00", "repeat": "00:30:00"}'
specifies a cycle from midnight to 8pm with a 30 minutes's interval.
- The order's start position can be specified using the
--start-position
option.- The option specifies the label of an instruction in the workflow from which the order is started, for example from a job.
- The label of a top-level instruction can be specified. For start positions from nested instructions the
--block-position
option has to be specified too.- Specifies the label of a block instruction such as JS7 - Resource Locks, should the
--start-position
option be used for a position inside the block instruction. - To specify the block position for a branch in a JS7 - Fork-Join Instruction the syntax
--block-position="<Fork-Instruction-Label>+<Branch-ID>"
can be used.
- Specifies the label of a block instruction such as JS7 - Resource Locks, should the
- The order's end position can be specified using the
--end-position
option.- Specifies the label of an instruction before which the order will terminate. More than one label can be specified separated by comma.
- If the
--block-position
option is used, then the end position is inside the block. Otherwise the order will terminate when reaching the block's end.
- The
- The command will delete existing orders and will create new orders with desired changes. The command will return the list of existing Order IDs and their mapping to newly created Order IDs in JSON format like this:
{
"#2025-07-14#P26757472840-pdsVariableBusinessDateSet": "#2025-07-29#P32195240717-pdsVariableBusinessDateSet",
"#2025-07-14#P26757472942-business-day-1": "#2025-07-29#P32195240718-business-day-1",
"#2025-07-14#P26757472031-pdCyclicSimpleWorkflowPeriodic": "#2025-07-29#P32195240610-pdCyclicSimpleWorkflowPeriodic",
"#2025-07-14#P26757471930-pdCyclicSimpleWorkflowContinuo": "#2025-07-29#P32195240609-pdCyclicSimpleWorkflowContinuo",
}
- Modifies orders for a given daily plan date, date range or list of Order IDs.
delete-submission
- When orders are added to the daily plan and are submitted to the Controller and Agents, then submissions are visible in the JS7 - Daily Plan History.
- The command is used to wipe the daily plan provided that no orders are available for the given date. The typical sequence of actions is to perform the following commands:
cancel-order
delete-order
delete-submission
- The above actions will wipe the daily plan. Subsequently the JS7 - Daily Plan Service will plan and will submit new orders for the given date when it will be in scope.
- get-pro-calendar
- Returns calendar dates for which order executions are available from JS7 - Daily Plan Projections.
- The date range can be specified by
--date-from
and--date-to
options. - Results can further be limited to execution dates for specific schedules or workflows.
- The date range can be specified by
- When used with the
--no-start-time
switch, then results will be inverted and calendar dates will be returned for which no related orders will be started.- For example, users can check if a given workflow will not be executed for days that are excluded by non-working day calendars.
- Returns calendar dates for which order executions are available from JS7 - Daily Plan Projections.
- get-pro-date
- Returns order start times that are available from JS7 - Daily Plan Projections.
- The date range can be specified by
--date-from
and--date-to
options. - Results can further be limited to execution dates for specific schedules or workflows.
- The date range can be specified by
- When used with the
--no-start-time
switch, then results will be inverted and dates will be returned for which no related orders will be started.
- Returns order start times that are available from JS7 - Daily Plan Projections.
create-pro
- Re-createss the JS7 - Daily Plan Projections. The operation is useful if schedules have been modified during the day and users want to immediately identify future start times.
- Other than by use of the command the projections are created on a daily basis by the JS7 - Daily Plan Service.
Options
--url
- Specifies the URL by which JOC Cockpit is accessible using
<http|https>://<host>:<port>
. - Example: http://centostest-primary.sos:4446
- Example: https://centostest-primary.sos:4443
- Specifies the URL by which JOC Cockpit is accessible using
--user
- Specifies the user account for login to JOC Cockpit. If JS7 - Identity Services are available for Client authentication certificates that are specified with the
--client-cert
and--client-key
options then their common name (CN) attribute has to match the user account. - If a user account is specified then a password can be specified using the
--password
option or interactive keyboard input can be prompted using the-p
switch.
- Specifies the user account for login to JOC Cockpit. If JS7 - Identity Services are available for Client authentication certificates that are specified with the
--password
- Specifies the password used for the account specified with the
--user
option for login to JOC Cockpit. - Password input from the command line is considered insecure.
- Consider use of the
-p
switch offering a secure option for interactive keyboard input. - Consider use of the
encrypt
command to encrypt a password:./operate-workflow.sh encrypt --in=root --cert=encrypt.crt
.- The encryption result will include the prefix
enc:
followed by the encrypted symmetric key, initialization vector and encrypted secret separated by space. - If an encrypted password is specified, then it will be decrypted using the Private Key file:
./operate-workflow.sh <command> --password="enc:BF8J8KP7TPlxy..." --key=encrypt.key
.
- The encryption result will include the prefix
- Consider use of the
- Specifies the password used for the account specified with the
--controller-id
- Specifies the identification of the Controller that holds related orders.
--ca-cert
- Specifies the path to a file in PEM format that holds the Root CA Certificate and optionally Intermediate CA Certificates to verify HTTPS connections to JOC Cockpit.
--client-cert
- Specifies the path to a file in PEM format that holds the Client Certificate if HTTPS mutual authentication is used..
--client-key
- Specifies the path to a file in PEM format that holds the Client Private Key if HTTPS mutual authentication is used..
--timeout
- Specifies the maximum duration for requests to the JS7 REST Web Service. Default:
60
seconds.
- Specifies the maximum duration for requests to the JS7 REST Web Service. Default:
--block-position
- Specifies the label of a block instruction such as JS7 - Resource Locks, should the
--start-position
option be used for a position inside the block instruction. Used withmodify-order
command. - To specify the block position for a branch in a JS7 - Fork-Join Instruction the syntax
--block-position="<Fork-Instruction-Label>+<Branch-ID>"
can be used.
- Specifies the label of a block instruction such as JS7 - Resource Locks, should the
--start-position
- Specifies the label of an instruction in the workflow from which the order is started, for example from a job. Used with the
modify-order
command. - The label of a top-level instruction can be specified. For start positions from nested instructions the
--block-position
option has to be specified too.
- Specifies the label of an instruction in the workflow from which the order is started, for example from a job. Used with the
--end-position
- Specifies the label of an instruction before which the order will terminate. More than one label can be specified separated by comma. Used with the
modify-order
command. - If the
--block-position
option is used, then the end position is inside the block. Otherwise the order will terminate when reaching the block's end.
- Specifies the label of an instruction before which the order will terminate. More than one label can be specified separated by comma. Used with the
--variable
- When used with the
modify-order
command, specifies one or more variables that hold key/value pairs separated by comma. - Example:
--variable="myVar1=myValue1,myVar2=myValue2"
- When used with the
--remove-variable
- When used with the
modify-order
command, specified one or more variables that should be removed from orders. - Example:
--remove-variable=myVar1,myVar2
- When used with the
--date-from
- Specifies the date in ISO format for which orders should be processed, for example
2023-10-23
. Used with most commands. - Dates can be calculated from the Unix OS
date
command, for example:--date-from="$(TZ=Europe/London date +'%Y-%m-%d')"
specifies the current date in the Europe/London time zone.--date-from="$(TZ=Europe/London date --date="1 day ago" +'%Y-%m-%d')"
specifies the date before the current day.
- Specifies the date in ISO format for which orders should be processed, for example
--date-to
- Specifies the date and time in ISO format of the end of a daily plan date range starting with
--date-from
, for example2023-10-23
. Used with most commands. - Dates can be calculated from the Unix OS
date
command, for example:--date-to="$(TZ=Europe/London date +'%Y-%m-%d')"
specifies the daily plan date before the current day in the Europe/London time zone.--date-to="$(TZ=Europe/London date --date="1 day ago" +'%Y-%m-%d')"
specifies the daily plan date before yesterday.
- Specifies the date and time in ISO format of the end of a daily plan date range starting with
--scheduled-for
- Specifies the date and time in ISO format of the daily plan date, for example
2023-10-23T15:45:00
. Date and time have to be specified when used with themodfy-order
andcopy-order
commands. - Dates and times can be calculated from the Unix OS
date
command, for example:--scheduled-for="$(TZ=Europe/London date +'%Y-%m-%dT%H:%M:%S')"
- The example specifies the daily plan date and time in the Europe/London time zone.
- Specifies the date and time in ISO format of the daily plan date, for example
--time-zone
- Specifies the time zone to be used for the
--date-from
and--date-to
options. By default the system time zone is used. - The time zone is specified from an identifier as explained by https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, for example
--time-zone=Europe/London
.
- Specifies the time zone to be used for the
--state
- Specifies one or more states - separated by comma - for which orders should be processed. Used with the
get-order
command. - Valid states include
PLANNED, SUBMITTED, FINISHED
. - For example
--state=PLANNED,SUBMITTED
will process orders holding any of the states specified.
- Specifies one or more states - separated by comma - for which orders should be processed. Used with the
--schedule
- Specifies one or more schedules - separated by comma - that should be processed. Used with most of the commands.
- For example
--schedule=Cyclic-Check,Daily-EOD
will consider theCyclic-Check
andDaily-EOD
schedules.
--schedule-folder
- Specifies one or more inventory folders from absolute paths - separated by comma - holding schedules that should be processed.
- For example
--schedule-folder=/ProductDemo/CyclicExecution,/ProductDemo/ScheduledExecution
will process schedules in the given folders. - If the
--recursive
switch is used then sub-folders will be looked up recursively.
--workflow
- Specifies one or more workflows - separated by comma - that should be processed. Used with most of the commands.
- For example
--workflow=Cyclic-Check,Daily-EOD
will consider theCyclic-Check
andDaily-EOD
workflows.
--workflow-folder
- Specifies one or more inventory folders from absolute paths - separated by comma - holding workflows that should be processed.
- For example
--folder=/ProductDemo/CyclicExecution,/ProductDemo/ScheduledExecution
will process workflows in the given folders. - If the
--recursive
switch is used then sub-folders will be looked up recursively.
--order-id
- Specifies one or more order identifiers - separated by comma - for which orders should be processed. Used with most commands.
- For example
--order-id=#2024-08-25#T54565139012-sos,#2024-08-25#T56189833113-sos
will process the indicated orders. - Order IDs are returned by the
get-order
command and can be used for filtering. The following example cancels orders only that carry an order name starting with the string "cyclic":order_ids=$(./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-14 \
| jq -r '.[] | select(.orderName | startswith("cyclic")) | .orderId')
./operate-daily-plan.sh cancel-order "${request_options[@]}" --order-id="$order_ids"
--audit-message
- Specifies a message that is made available to the Audit Log.
- Specification of Audit Log messages can be enforced on a per user basis and for a JS7 environment.
--audit-time-spent
- Specifies the time spent to perform an operation which is added to the Audit Log.
- The option can be specified if the -
-audit-message
option is used.
--audit-link
- Specifies a link (URL) which is added to the Audit Log.
- The option can be specified if the -
-audit-message
option is used.
--log-dir
- If a log directory is specified then the script will log information about processing steps to a log file in this directory.
- File names are created according to the pattern:
operate-workflow.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
- For example:
operate-workflow.2022-03-19T20-50-45.log
Switches
-h | --help
- Displays usage.
-v | --verbose
- Displays verbose log output that includes requests and responses with the JS7 REST Web Service.
- When used twice as with
-v -v
then curl verbose output will be displayed.
-p | --password
- Asks the user for interactive keyboard input of the password used for the account specified with the
--user
option.. - The switch is used for secure interactive input as an alternative to use of the option
--password=<password>
.
- Asks the user for interactive keyboard input of the password used for the account specified with the
-k | --key-password
- Asks the user for interactive keyboard input of the password used for access to a keystore or key file specified with the
--keystore
or--key
options. - The switch is used for secure interactive input as an alternative to use of the
--key-password=<password>
option.
- Asks the user for interactive keyboard input of the password used for access to a keystore or key file specified with the
-r | --recursive
- Specifies that folders will be looked up recursively if the
--schedule-folder
or--workflow-folder
options are used.
- Specifies that folders will be looked up recursively if the
-s | --submit
- When used with the
generate-order
command, orders will be created and submitted to the Controller and Agents.
- When used with the
-l | --late
- Specifies that the
get-order
andcancel-order
comands will be performed for late orders only that exceeded their planned start time.
- Specifies that the
-i | --stick-to-plan
- Specifies that orders affected by the
modify-order
andcopy-order
commands can be assigned new start times but still will be members of the same daily plan when it comes to resolving JS7 - Daily Plan Dependencies.
- Specifies that orders affected by the
-n | --non-auto-plan
- Specifies that the
generate-order
command will consider released schedules that are not configured for automated planning and submission of orders.
- Specifies that the
-t | --no-start-time
- Specifies that the
get-pro-calendar
andget-pro-date
commands will invert results to return days for which no order start times are projected.
- Specifies that the
-f | --force
- When used with the
modify-order
andcopy-order
commands, then JS7 - Admission Times for Jobs will be ignored and jobs will be executed immediately.
- When used with the
--show-logs
- Displays the log output created by the script if the
--log-dir
option is used.
- Displays the log output created by the script if the
--make-dirs
- If directories are missing that are indicated with the
--log-dir
option then they will be created.
- If directories are missing that are indicated with the
Exit Codes
0:
operation successful1
: argument errors3
: no objects found4
: JS7 REST Web Service is not reachable or reports errors
Examples
The following examples illustrate typical use cases.
Getting Orders
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # get orders for current daily plan date ./operate-daily-plan.sh get-order "${request_options[@]}" # get late orders for current daily plan date ./operate-daily-plan.sh get-order "${request_options[@]}" --late # get number of late orders for current daily plan date ./operate-daily-plan.sh get-order "${request_options[@]}" --late | jq '. | length' # get orders for daily plan date ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-11 # get orders for daily plan date range ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-11 --date-to=2025-07-17 # get orders for current date in the given time zone ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=$(TZ=Europe/London date +'%Y-%m-%d') # get orders for last 7 days in the given time zone ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=$(TZ=Europe/London date --date="1 week ago" +'%Y-%m-%d') \ --date-to=$(TZ=Europe/London date --date="1 day ago" +'%Y-%m-%d') # get orders for daily plan date and process results ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-14 | jq -r '.[] | .orderId' # get orders for daily plan date and schedules ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-11 --schedule=pdsScheduledWorkflowCyclic,pdTaggingOrders-01 # get orders for daily plan date and schedule folders ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-11 --schedule-folder=/ProductDemo --recursive # get orders for daily plan date and workflows ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-11 --workflow=pdwScheduledWorkflow_001,pdwScheduledWorkflow_002 # get orders for daily plan date and workflow folders ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-11 --workflow-folder=/ProductDemo --recursive # get orders for daily plan date and status ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-10 --state=SUBMITTED # get orders for daily plan date and late execution ./operate-daily-plan.sh get-order "${request_options[@]}" --date-from=2025-07-10 --late
Submitting Orders
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # submit orders for daily plan date ./operate-daily-plan.sh submit-order "${request_options[@]}" --date-from=2025-07-13 # submit orders for daily plan date range ./operate-daily-plan.sh submit-order "${request_options[@]}" --date-from=2025-07-10 --date-to=2025-07-10 # submit orders for daily plan date and schedules ./operate-daily-plan.sh submit-order "${request_options[@]}" --date-from=2025-07-11 --schedule=pdsScheduledWorkflowCyclic,pdTaggingOrders-01 # submit orders for daily plan date and schedule folders ./operate-daily-plan.sh submit-order "${request_options[@]}" --date-from=2025-07-11 --schedule-folder=/ProductDemo --recursive # submit orders for daily plan date and workflows ./operate-daily-plan.sh submit-order "${request_options[@]}" --date-from=2025-07-11 --workflow=pdwScheduledWorkflow_001,pdwScheduledWorkflow_002 # submit orders for daily plan date and workflow folders ./operate-daily-plan.sh submit-order "${request_options[@]}" --date-from=2025-07-11 --workflow-folder=/ProductDemo --recursive
Cancelling Orders
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # cancel orders for daily plan date ./operate-daily-plan.sh cancel-order "${request_options[@]}" --date-from=2025-07-13 # cancel orders for daily plan date range ./operate-daily-plan.sh cancel-order "${request_options[@]}" --date-from=2025-07-10 --date-to=2025-07-14 # cancel orders for daily plan date and schedules ./operate-daily-plan.sh cancel-order "${request_options[@]}" --date-from=2025-07-11 --schedule=pdsScheduledWorkflowCyclic,pdTaggingOrders-01 # cancel orders for daily plan date and schedule folders ./operate-daily-plan.sh cancel-order "${request_options[@]}" --date-from=2025-07-11 --schedule-folder=/ProductDemo --recursive # cancel orders for daily plan date and workflows ./operate-daily-plan.sh cancel-order "${request_options[@]}" --date-from=2025-07-11 --workflow=pdwScheduledWorkflow_001,pdwScheduledWorkflow_002 # cancel orders for daily plan date and workflow folders ./operate-daily-plan.sh cancel-order "${request_options[@]}" --date-from=2025-07-11 --workflow-folder=/ProductDemo --recursive
Deleting Orders
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # delete orders for daily plan date ./operate-daily-plan.sh delete-order "${request_options[@]}" --date-from=2025-07-13 # delete orders for daily plan date range ./operate-daily-plan.sh delete-order "${request_options[@]}" --date-from=2025-07-10 --date-to=2025-07-10 # delete orders for daily plan date and schedules ./operate-daily-plan.sh delete-order "${request_options[@]}" --date-from=2025-07-14 --schedule=pdsScheduledWorkflowCyclic,pdTaggingOrders-01 # delete orders for daily plan date and schedule folders ./operate-daily-plan.sh delete-order "${request_options[@]}" --date-from=2025-07-14 --schedule-folder=/ProductDemo --recursive # delete orders for daily plan date and workflows ./operate-daily-plan.sh delete-order "${request_options[@]}" --date-from=2025-07-14 --workflow=pdwScheduledWorkflow_001,pdwScheduledWorkflow_002 # delete orders for daily plan date and workflow folders ./operate-daily-plan.sh delete-order "${request_options[@]}" --date-from=2025-07-14 --workflow-folder=/ProductDemo --recursive
Generating Orders
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # generate orders starting for daily plan date ./operate-daily-plan.sh generate-order "${request_options[@]}" --date-from=2025-07-14 # generate orders for daily plan date and schedules ./operate-daily-plan.sh generate-order "${request_options[@]}" --date-from=2025-07-14 --schedule=pdsScheduledWorkflowCyclic,pdTaggingOrders-01 # generate orders for daily plan date and schedule folders ./operate-daily-plan.sh generate-order "${request_options[@]}" --date-from=2025-07-14 --schedule-folder=/ProductDemo --recursive # generate orders for daily plan date and workflows ./operate-daily-plan.sh generate-order "${request_options[@]}" --date-from=2025-07-14 --workflow=pdwScheduledWorkflow_001,pdwScheduledWorkflow_002 # generate orders for daily plan date and workflow folders ./operate-daily-plan.sh generate-order "${request_options[@]}" --date-from=2025-07-14 --workflow-folder=/ProductDemo --recursive
Modifying Orders
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # move order start times 2 hours earlier for daily plan date and keep daily plan assignment ./operate-daily-plan.sh modify-order "${request_options[@]}" --date-from=2025-07-14 --scheduled-for=cur-02:00:00 --stick-to-plan # move order start times 2 hours later for daily plan date and keep daily plan assignment ./operate-daily-plan.sh modify-order "${request_options[@]}" --date-from=2025-07-14 --scheduled-for=cur+02:00:00 --stick-to-plan # modify order start times for immediate execution of a number of workflows ./operate-daily-plan.sh modify-order "${request_options[@]}" --date-from=2025-07-14--scheduled-for=now --stick-to-plan --workflow-folder=/ProductDemo --recursive # modify order variables ./operate-daily-plan.sh modify-order "${request_options[@]}" --order-id="#2025-07-14#P26757473449-daily-2,#2025-07-14#P26757473247-daily-1" \ --variable="booking_code=9999,booking_number=39" # remove order variables ./operate-daily-plan.sh modify-order "${request_options[@]}" --order-id="#2025-07-14#P32659837830-daily-2,#2025-07-14#P32659837729-daily-1" \ --remove-variable="booking_number,booking_code"
Copying Orders
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # copy orders from given date to target date ./operate-daily-plan.sh copy-order "${request_options[@]}" --date-from=2025-07-14 ---scheduled-for=2025-07-28 # copy orders from given date range to target date ./operate-daily-plan.sh copy-order "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 --scheduled-for=2025-07-28 # copy order from given date and workflow folder to target date ./operate-daily-plan.sh copy-order "${request_options[@]}" --date-from=2025-07-14 --scheduled-for=2025-07-28 --workflow-folder=/ProductDemo --recursive
Deleting Submissions
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # delete submission for given daily plan date ./operate-daily-plan.sh delete-submission "${request_options[@]}" --date-from=2025-07-14 # cleanup daily plan for the given date range ./operate-daily-plan.sh cancel-order "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 ./operate-daily-plan.sh delete-order "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 ./operate-daily-plan.sh delete-submission "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17
Getting Calendar Dates from Projections
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # get projected calendar dates of order starts in date range ./operate-daily-plan.sh get-pro-calendar "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 # get projected calendar dates of order starts in date range filtered by schedules ./operate-daily-plan.sh get-pro-calendar "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 --schedule-folder=/ProductDemo --recursive # get projected calendar dates without order starts in date range filtered by schedule folders ./operate-daily-plan.sh get-pro-calendar "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 --schedule-folder=/ProductDemo --recursive --no-start-time
Getting Start Times from Projections
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # get projected dates/times of order starts for date range ./operate-daily-plan.sh get-pro-date "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 # get projected dates/times of order starts in date range filtered by schedules ./operate-daily-plan.sh get-pro-date "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 --schedule-folder=/ProductDemo --recursive # get projected dates/times without order starts in date range filtered by schedules ./operate-daily-plan.sh get-pro-date "${request_options[@]}" --date-from=2025-07-14 --date-to=2025-07-17 --schedule-folder=/ProductDemo --recursive --no-start-time
Creating Projections
# common options for connection to JS7 REST API request_options=(--url=http://localhost:4446 --user=root --password=root --controller-id=controller) # create projections ./operate-daily-plan.sh create-pro "${request_options[@]}"
Resources
- API
- Workflow Deployment Operations
- Workflow Status Operations
- Controller Deployment Operations
- Controller Status Operations
- Identity Service Deployment Operations
- JOC Cockpit Status Operations
- Git Deployment Operations