.. _deactivate-activate-schedules:

Bulk Schedule Activation / Deactivation
-------------------------------------------

.. _21.4-PB2|EKB-15544:

:bdg-info-line:`sys-admin`

VOSS Automate provides a bulk schedule tool for creating a catalog of active and inactive schedules, and for activating and 
de-activating these schedules. For systems with many schedules, this facilitates simpler activation and 
de-activation of scheduled tasks when downtime is needed, for example, when upgrading. 


Exposing the utility
.....................

The bulk schedule tool is comprised of a set of data models, views, configuration templates, and workflows. 

High level administrators with access to the following data models can expose the utility on 
an administrator menu:

======================================== ==========================================================
Data model                               Description 

``data/BulkScheduleTool_Catalog``        A data model that stores the list of created schedule 
                                         catalogs. Each 
                                         entry is identified by the entered catalog name and 
                                         contains a list of schedules that were active 
                                         on creation.

``view/BulkScheduleTool``                A form allowing the admin to create catalogs of 
                                         schedules to deactivate and re-activate a selected catalog 
                                         of schedules.
======================================== ==========================================================

.. note::

   The administrator's access profile should also allow create permissions on these models.


Using the Bulk Schedule Tool
..................................

Administrators with access to the bulk schedule tool from their menu can perform the 
bulk schedule deactivation and reactivation task, which is typically done before 
and after a system upgrade. This will allow better management of scheduled tasks 
during upgrades.

On the view interface:

1. To create a new catalog of schedules and deactivate these:
   
   From **Choose Action**, select **Catalog and Deactivate Schedules**,
   enter a catalog name in **New Catalog Name** and click **Save**.

   A workflow will collect the name of all active schedules and add this list along with
   the catalog name to be stored in the data model. The list of schedules are also deactivated.
   This can be verified from the **Administration Tools > Scheduling** menu. 
2. To reactivate a catalog of schedules:

   From **Choose Action**, select **Activate Deactivated Catalog**,
   select the **Restore catalog Name** and click **Save**.

   A workflow will reactivate all deactivated schedules in the catalog.

   .. note::

      If any schedules in the selected catalog are not available or have already been activated,
      these are ignored.


