.. _time-periods:

Time periods
-------------

.. tip:: 

   :ref:`use-action-search-to-navigate-automate`



Overview
..........

A time period specifies a time range that includes a start time and end
time. Time periods also specify a repetition interval either as days of
the week or a specified date on the yearly calendar. You define time
periods and then associate the time periods with time schedules. A
particular time period can be associated with multiple time schedules.

.. note::

   Automate provides one **All the time** time period, which is a special, default time 
   period that includes all days and hours, and cannot be deleted.


Configure time periods
.......................

1. Log in to the Admin Portal as a Provider, Reseller, or Customer administrator.
2. Set the hierarchy path to the node where you wish to configure the new time period.
3. Go to **Time Periods**.

4. **Choose an option**: 

   * **Add a new time period**? Click **Add**, then go to Step 5.
   * **Edit an existing time period**? Select the time period to be updated by
     clicking it in the list of time periods, then go to Step 6.

5. To add a new time period, if the **Network Device List** popup window appears, choose the NDL for the time
   period from the drop-down menu. The window appears when you are on a non-site
   hierarchy node. If you are at a site hierarchy node, the NDL associated with
   the site is automatically used.

   .. note:: 

      The **Network Device List** drop-down menu displays only when adding a time period; it does not display 
      when editing a time period.

6. When adding or editing a time period, add or update a unique name for the time period in the **Name** field. 
   This field is mandatory. Enter a name in the **Time Period Name** field. 

   .. note:: 

      Time period name can comprise up to 50 alphanumeric characters. It
      can contain any combination of spaces, periods (.), hyphens (-), and underscore characters (_).

      Use concise and descriptive names for your time periods. The hours_or_days format usually provides a 
      sufficient level of detail and is short enough to enable you to quickly and easily identify a time period. 
      For example, *office_M_to_F* identifies a time period for the business hours of an office 
      from Monday to Friday.

7. Complete the other fields as appropriate.

.. tabularcolumns:: |p{3.5cm}|p{12cm}|

+-------------------+------------------------------------------------+
| Option            | Description                                    |
+===================+================================================+
| Description       | Enter a description for the time period.       |
+-------------------+------------------------------------------------+
|                   | From the drop-down list, choose the time       |
|                   | when this time period starts. The available    |
|                   | listed start times comprise 15-minute          |
|                   | intervals throughout a 24-hour day.            |
|                   |                                                |
| Time of Day Start | Default: No Office Hours                       |
|                   |                                                |
|                   | Note:                                          |
|                   |                                                |
|                   | To start a time period at midnight, choose     |
|                   | the 00:00 value.                               |
+-------------------+------------------------------------------------+
|                   | From the drop-down list, choose the time       |
|                   | when this time period ends. The available      |
|                   | listed end times comprise 15-minute intervals  |
|                   | throughout a 24-hour day.                      |
|                   |                                                |
| Time of Day End   | Default: No Office Hours                       |
|                   |                                                |
|                   | Note:                                          |
|                   |                                                |
|                   | To end a time period at midnight, choose the   |
|                   | 24:00 value.                                   |
+-------------------+------------------------------------------------+

8. Choose a repetition period, and complete the required information:

   .. note:: 
      
      If choosing to repeat the time period by the week, the **Repeat Every Year**
      fields are read-only. If choosing to repeat the time
      period by the year, the **Repeat Every Week** fields are read-only.

   **Repeat Every Week** - For time periods defined by the week

   a. From the **Start Day** drop-down menu, choose a day of the week
      on which this time period starts.
   b. From the **End Day** drop-down menu, choose a day of the week on
      which this time period ends.

   **Repeat Every Year** - For time periods defined by the year

   a. From the **Start Month** drop-down menu, choose a month of the year on which
      this time period starts.
   #. Enter a number from 1 to 31 in the **Start Date** field to define the day of
      the month on which this time period starts.
   #. From the **End Month** drop-down menu, choose a month of the year on which
      this time period ends.
   #. Enter a number from 1 to 31 in the **End Date** field to define the day of the
      month on which this time period ends.

   * For weekly time intervals, choose a Start Day on Mon and End Day of Fri for
     a time period starting on Mondays and ending on Fridays.
   * For weekly time intervals, choose Start Day and End Day values of Sat to
     define a time period that applies only on Saturdays.
   * For yearly time intervals, choose Start Month value of Jan and Start Date of 
     15, and End values of Mar and 15 to choose the days from January 15 to March 15.
   * For yearly time intervals, choose Start and End values of Jan and 1 to specify
     January 1 as the only day during which this time period applies.

9. Click **Save** to save the new or updated time period.

   **Next steps**: Associate time periods with time schedules. See "Configure Time Schedules".

.. note:: 

   You can't delete time periods if they're used by any time schedules. Before
   deleting a time period that is currently in use, perform either or both
   of these tasks as appropriate:

   * Assign a different time period to any time schedule that is using
     the time period that you want to delete.
   * Delete the time schedules that are using the time period that you
     want to delete.

