Schedule Automation

With Azure Automation configured, the VMs tagged, and the Runbooks tested, we can schedule their execution for scheduled automation.

This section will show the steps required for that to be accomplished:

Info

In this example we will show you how to schedule the Stop-SAPSystem runbook. You can follow the same steps for other runbooks and SIDs.

  1. Go to the Azure Automation Account SAPAutomationAcc and select Schedules on the left panel. Click on Add a schedule. Provide the following parameters:
  • Name: Shutdown SAPDEV
  • Description: Shutdown SAPDEV
  • Starts: Tomorrow @ 6:00PM
  • Timezone: Your timezone
  • Recurrence: Recurring
  • Recur Every: 1 Day
  • CLick Create ss1
  1. Ok, so far we created the schedule but we haven’t specified the runbook to be executed. Once the Schedule is created, click on Runbooks on the left panel. ss1

  2. Pick the Stop-SAPSystem Runbook. ss1

  3. On Overview click on Link to schedule. ss1

  4. Click on Link a schedule to your Runbook ss1

  5. Pick the Shutdown SAPDEV schedule we just created. ss1

  6. Click on configure parameters and run settings ss1

  7. Set the following parameters, just we did on the manual execution:

  • SAPSID: S4H
  • SOFTSHUTDOWNTIMEINSECONDS: 150
  • CONVERTDISKTOSTANDARD: False
  • PRINTEXECUTIONCOMMAND: True
  • Click OK ss1

All set ! At 6PM tomorrow (and every day after that) Azure Automation will run the runbook with the provided parameters.

You can check the Job executions by clicking on the Automation Account SAPAutomationAcc and selecting Jobs on the left panel.
ss1

Once you pick the desired execution, you can see the details just like we did on the manual execution. ss1

Congratulations, you have scheduled your SAP to be stopped automatically using a Runbook!