# Schedules

The Schedules tab allows you to set up start/stop and delete schedules for your database service.

### Start/Stop Schedule

To configure the Start/Stop Schedule:

1. Click **Add** on the right-side.\
   The ‘Create Schedule’ dialog box pops up with following fields:

* **Repeat** - To configure the repeat interval for your action. You can select any of these values from the dropdown list:
  * **Does not repeat** - The schedule runs only one time for the configured date and time.
    * Choose a start and stop day and time under the **Duration**.
  * **Daily** - The schedule runs daily on the configured time. To configure the end repetition schedule:
    * Select **Never**, if you don't want to end the repetition.
    * Select **On** and a date from the field below, if you want to end the repetition of the schedule on a particular date.
    * Select **After** and provide a number N in the field on the right side, if you want to end the repetition of the schedule after N occurrences.
    * Choose a start day and time under the **Duration**. Stop day and time depends on the choices you made in previous steps.
  * **Weekly** - The schedule runs weekly on the configured day and time.
    * Select the days you want to run the action in a week.

      To configure the end repetition schedule:
    * Select **Never**, if you don't want to end the repetition.
    * Select **On** and a date from the field below, if you want to end the repetition of the schedule on a particular date.
    * Choose a start day and time under the **Duration**. Stop day and time depends on the choices you made in previous steps.

2. After providing all the details, click **Submit**.

The configured schedules are listed below the Start/Stop Schedule option on this page. It displays:

* **Start date** - Displays the configured start date for the schedule.
* **Duration** - Displays the duration for which your database service is up and running.
* **Repeat** - Displays the schedule frequency. The possible values are **Does not repeat**, **Daily**, **Weekly**.

### Delete Schedule

To configure the delete schedule:

1. Click **Add** on the right-side.\
   A window pops up with fields, ‘Delete on’ to configure a date and time when you want to delete your service.
2. Select the calendar button on the right-side to choose the date.
3. In the next field, select the clock button to choose the time.
4. Select whether to retain the Availability Machine.
5. Select **Yes**, if you want to delete only the service and retain the Availability Machine.
6. Select **No**, if you want to delete the service and Availability Machine both.
7. Click **Submit**.

The configured delete schedules are displayed below the Delete Schedule option on this page. It displays:

**Delete on** - Displays the date and time when your database service is scheduled to delete. Also, it mentions if the Availability Machine is to be retained along with the service or not.

### Refresh schedule

Any existing refresh schedules are displayed in the schedules section of the cloned service.

The schedule can be updated, paused, or deleted through the ellipsis icon.

* If a database service is running some other operation (patching, instance addition, parameter profile update, snapshot in progress, and so on). The database refresh is not triggered at the scheduled time and marked as SKIPPED.
* If there was no recent snapshot accessible to the schedule owner and the database refresh was triggered. In this case, the database refresh is marked as SKIPPED.

As an alternative method, use the code to configure the Start/Stop/Delete schedule.

1. Use the **Code** button at the bottom-right corner to view the ‘Code for start/stop/delete schedule’ window.
2. On the left-hand side of the window, you can view the API, its type and the payload.
3. On the right-hand side of the window, you can view the code to start/stop/delete schedule in various languages like Shell, Python, Go, Java, Javascript, and Powershell that you can run independently.
4. Copy and download the code in any of the languages using the copy and download button on the top right-side of the window.
5. Select **Close** to come back to the schedule window.

**Figure 10 - Schedules tab**

![](https://3421475909-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXNKiIctERJykfezXfUU2%2Fuploads%2Fgit-blob-970bf060409e7cd395ef0d62361ac0161f28a2bb%2Fschedules.png?alt=media)
