Versions Compared

Key

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

...

The following explanations focus on the scenario to clean up the Daily Plan from past dependencies of a previous day using Unix shell scripts.

Cleanup

Cleanup includes two operations for which script solutions are available:

...

Anchor
job_cancel_orders
job_cancel_orders
Job: Cancel-Orders

The job makes use of the cancel-order.sh shell script to cancel orders waiting for past notices from JS7 - Notice Boards.

For details see JS7 - How to cancel orders using the REST Web Service API from the Shell.



Explanations:

Job: Delete Notices

x

...

      • : provides examples for use of different authentication methods that similarly apply to shell jobs.
    • --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 --date="1 day ago" +'%Y-%m-%d')T00:00:00": Specifies the date and time to which orders have been scheduled that will 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.

Anchor
job_delete_notices
job_delete_notices
Job: Delete Notices

The job makes use of the delete-notices.sh shell script to delete notices from JS7 - Notice Boards.

For details see JS7 - How to delete notices using the REST Web Service API from the Shell


Image Added


Explanations:

  • Parameterization of the delete-notices.sh 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 --date expects a date without time as it specifies the day for which notices have been created that should be deleted.
    • --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.

Further Resources

...