Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Parameterization of the cancel-orders.sh shell script includes:
    • -url="${JS7_JOC_URL}: The JOC Cockpit URL is provided from an environment variable that users can specify with the Default job resource.
    • -user=root, --password=root: The example makes use of user/password authentication. A number of ways are offered for authentication and management of credentials:
    • --controller-id="${JS7_CONTROLLER_ID}": The Controller ID is provided from an environment variable available with the Default job resource.
    • --date-to="$(TZ="${JS7_AGENT_TZ}" date +'%Y-%m-%d')T00:00:00": Specifies the date and time to which orders have been scheduled that will be cancelled.
      • The time zone is provided from the JS7_AGENT_TZ environment variable available from the Default job resource.
      • The syntax TZ=<time-zone> date ... executes the date command for the time zone specified. For time zone identifiers see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
      • If the job is executed on 23rd of October 2023 then the parameterization evaluates to --date-to=2023-10-23T00:00:00 to indicate that any orders scheduled prior to this date should be cancelled.
    • --time-zone="${JS7_AGENT_TZ}": Specifies that the Agent's time zone will be used. The value of this option has to match the time zone assumed for the --date-to option.
    • --states=SCHEDULED,WAITING: Specifies that orders in the SCHEDULED and WAITING state should be cancelled, see JS7 - Order State Transitions.
  • Error handling allows exit codes 0 and 3 to signal successful execution. Exit 3 signals that no orders have been found that match the criteria which is not considered an error.

Anchor
job_delete_notices
job_delete_notices
Job: Delete Notices

...

  • Parameterization of the delete-notices.sh shell script includes:
    • For parameters related to access and authentication with JOC Cockpit see chapter Job: Cancel-Orders
    • --date="$(TZ="${JS7_AGENT_TZ}" date --date="1 day ago" +'%Y-%m-%d')": Explanations for job Cancel-Orders apply. The difference being that the --date expects a date without time as it specifies the day for which Notices have been created that should be deleted. In addition, the parameterization specifies to use previous day. If the job is executed on 23rd of October 2023 then the parameterization evaluates to --date=2023-10-22.
    • --time-zone="${JS7_AGENT_TZ}": Specifies that the Agent's time zone will be used. The value of this option has to match the time zone assumed for the --date option.
  • Error handling allows exit codes 0 and 3 to signal successful execution. Exit code 3 signals that no notices have been found that match the criteria which is not considered an error.

Logging

Log output of the workflow can look like this:

Image Added


Explanations:

  • For both jobs the parameterization is logged.
  • The jobs did not find orders/notices for cancellation/deletion. This fact is logged to the stderr channel but is not considered an error.

Further Resources

...