---
title: "Add recurring downtime"
description: "Opsview does not support setting recurring downtime directly within the product interface. You can configure recurring downtime by using provided support scripts and scheduling them via crontab on the orchestrator."
url: "https://docs.itrsgroup.com/docs/faq/opsview/9314828860061-opsview-add-recurring-downtime/index.html"
---
Opsview does not currently have the functionality to set recurring downtime within the product, but you may use a script to do this via the crontab.

**Prerequisites**

- Opsview support scripts must be installed on the orchestrator: `[Opsview - Install support scripts](https://docs.itrsgroup.com/docs/faq/opsview/4922901644445-opsview-install-support-scripts/index.html)`

- Ensure these are up-to-date: `[Opsview - Update support scripts](https://docs.itrsgroup.com/docs/faq/opsview/4922932284445-opsview-update-support-scripts/index.html)`

**Files of interest**

`/opt/opsview/supportscripts/bin/recur_downtime`

`/opt/opsview/supportscripts/etc/recur_downtime.yml`.

**Process**

1. Run the following command to create the necessary configuration file.
   - importantly, the \*.yml.in file must be preserved.

   ```
   # cd /opt/opsview/supportscripts
   # cp -p etc/recur_downtime.yml.in etc/recur_downtime.yml
   ```

2. Modify `/opt/opsview/supportscripts/etc/recure_downtime.yml`

   Make changes appropriately to this file including or excluding/removing references to the hostgroups or hosts section/lines. e.g. use the hostgroups section for setting downtime for a host group. Once completed, it may now be incorporated within the opsview crontab.

   **Note:** If the Opsview UI is not using HTTPS please replace "https" in the url directive with "http".

**Example**

```
opsview:
  url: http://localhost/
  ssl_verify_hostname: 0
  username: (please supply with opsview username)
  password: (please supply with opsview password)
  debug: 0

downtime:
  - comment: Scheduled recurring downtime
    frequency: 3rd Tuesday of every month
    start_time: 22:00
    duration: 4h
    hostgroups:
      - MyHostgroup
    hosts:
      - Host_1
      - Host_2
```


