Auto Start / Stop Compute Instances

By | January 3, 2019

I have extended the library of scripts for automatic scheduling. There was already a script to auto Scale BM Database and ATP/ADW instances. New is the autoOnOff script for compute instances.

Based on a pre-defined tag in the namespace “Schedule” you can now automatically power on or off compute instances. This will not delete any of the data, but just powers the VM instance on or off. When compute instances are powered off, this will be done by a “softstop”, this means the instance will gracefully shutdown by sending a shutdown command to the operating system.

You can find the script here:

14 thoughts on “Auto Start / Stop Compute Instances

  1. Manu


    I have one question: you run this script connected on the db system with putty(as it seems in youtube video you have for autoscalling) or you run it from the shell on your laptop with oci cli configured?

    Thank you

    1. richard Post author

      Hi,in principle you can run the script from anywhere as long as it can connect to the API service from OCI.

  2. Manu

    Thank you for the answer.
    I have managed to succesfully run the script from a docker image, at works perfectly for normal instances but it doesn’t seems to work on DB System, where I am trying to stop/start a node.:(

    1. Manu

      I was trying starting/stopping DBS, ATP and ADW but except normal instance I was unsuccesfull

    2. richard Post author

      Database Instances can not be stopped. You can start/stop autonomous services, but this different API call then needed for a compute instance.

    3. AK

      Could you please share DockerFile for this setup ? i am trying build Image.

  3. Pingback: Autoscaling Options in OCI

  4. Maxime

    Thank you for your work !
    A little mistake in the README, WeekDay is written, but the script is checking for Weekday

  5. AK

    i wouldnt find Tag namespace Schedule, how do i create it?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.