OCI: How to Automate Stop and Start of OCI Instances using OCI CLI
APPLIES TO
Oracle Cloud Infrastructure
Linux OS
GOAL
The main goal of this document is to explain how to automate stop and start of OCI Instances using OCI CLI from Linux instance which is running on OCI.
SYMPTOMS
- The scheduled cronjob failed to initiate the start and stop actions for Oracle Cloud Infrastructure (OCI) instances as planned.
- The cronjob was set up on a network-accessible server to manage the instances' power actions remotely.
- The provided command for the cronjob contained an incorrect path, leading to unexpected behavior.
CAUSE
The cronjob command executed from the path /home/opc/oci instead of the correct path /usr/bin/oci. This incorrect path resulted in the cronjob failing to initiate the desired actions.
Tagged:
0