{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":29264,"path":"it-operations-management/cloud-configuration-governance/sched-uni-disco-srvacct-cloudmgt.md","title":"Schedule discovery of all resources in a service account","bundle":null,"doc_type":null,"release":"australia","body":"\n# Schedule discovery of all resources in a service account\n\nAdd a custom schedule for Discovery to discover all resources in each datacenter in a service account and then update the CMDB with the new information.\n\n## Before you begin\n\n-   A cloud account must exist with service accounts and associated datacenters. You must run on-demand Discovery to discover datacenters before you can schedule Discovery.\n-   Use the Cloud Discovery Workspace, and at least version 1.15 of Discovery and Service Mapping Patterns from the ServiceNow Store.\n\nRole required: sn\\_cmp.cloud\\_admin\n\n## About this task\n\n-   Scheduled [Cloud Discovery](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/discovery/cloud-discovery-wizard.md) discovers only datacenters that are part of the service account when the schedule is created. If datacenters have been added since the time you created the schedule, Discovery does not discover those datacenters. Delete the old schedule and create a schedule every time the datacenters in a service account change.\n-   Discovery populates the CMDB with the discovered resources and updates the resource information on the **Resources** tab. You can view Discovery results on the **Discovery Log** tab.\n\n**Important:** Use the Cloud Discovery Workspace to run the discovery schedule. The discover datacenter UI action is legacy and the preferred approach is to setup schedules from CDW.\n\n## Procedure\n\n1.  In the **Cloud Admin Portal** navigate to **Manage** &gt; **Discovery Schedules**.\n\n2.  Select **Add Cloud Schedule**.\n\n3.  On the Add Account page, select the cloud **Provider** and enter a unique, descriptive **Name** for the schedule.\n\n4.  In the **Service Account** section, select **Select Account**, specify the service account, and then click **Next**.\n\n    **Note:** To create a service account, select **Add Account** and then fill in the form. For details, see the process of setting up a service account in the Day 1 setup guide.\n\n5.  On the Select Datacenters page, move the datacenters to discover into the **Selected** list.\n\n    To select all datacenters, select **Discover all datacenters listed below**.\n\n6.  Click **Next**.\n\n7.  On the Create Schedule page, you specify the time and frequency of discovery.\n\n    **Note:** **Run time** setting uses the system time zone.\n\n<table id=\"table_qtt_rtf_br\"><thead><tr><th>\n\nFrequency\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nOn Demand\n\n</td><td>\n\nDoesn’t run on a schedule. Select **Discover now** to run Discovery. This is the default option.\n\n</td></tr><tr><td>\n\nDaily\n\n</td><td>\n\nRuns every day. Use the **Start time** field to specify the time of day.\n\n</td></tr><tr><td>\n\nWeekly\n\n</td><td>\n\nRuns on one designated day of each week. Use the **Start time** field to specify the time of day.\n\n</td></tr><tr><td>\n\nMonthly\n\n</td><td>\n\nRuns on one designated day of each month. Use the **Day** field to select the day of the month. Use the **Start time** field to specify the time of day. If the designated day doesn’t occur in the month, the schedule doesn’t run that month. For example, if you designate day 30, the schedule doesn’t run in February.\n\n</td></tr><tr><td>\n\nPeriodically\n\n</td><td>\n\nRuns every designated time. Use the **Repeat Interval** field to define the time in days, hours, minutes, and seconds. The first Discovery runs at the point in time defined in the **Starting** field. The subsequent discoveries run after each **Repeat Interval** period passes.\n\n</td></tr><tr><td>\n\nOnce\n\n</td><td>\n\nRun one time as designated by the date and time defined in the **Starting** field.\n\n</td></tr><tr><td>\n\nWeekdays\n\n</td><td>\n\nRuns every Monday, Tuesday, Wednesday, Thursday, and Friday. Use the **Start time** field to select the time of day.\n\n</td></tr><tr><td>\n\nWeekends\n\n</td><td>\n\nRuns every Saturday and Sunday. Use the **Start time** field to select the time of day.\n\n</td></tr><tr><td>\n\nMonth Last Day\n\n</td><td>\n\nRun the last day of every month. Use the **Start time** field to select the time of day.\n\n</td></tr><tr><td>\n\nCalendar Quarter End\n\n</td><td>\n\nRuns on March 31, June 30, September 30, and December 31. Use the **Start time** field to select the time of day. To change the dates, modify the DiscoveryScheduleRunType script include.\n\n</td></tr><tr><td>\n\nAfter Discovery\n\n</td><td>\n\nAllows you to sequentially stagger the schedule. Use this option to run this schedule after the Discovery designated in the **Run after** field finishes. Select the **Even if canceled** check box to designate that this discovery should run even if the **Run after** Discovery is canceled before it finishes.\n\n -   This option isn’t valid when the Discovery is started via DiscoverNow, or when using the Discover CI feature.\n-   You can’t designate an inactive Discovery schedule.\n-   You can’t create a loop by designating the run after Discovery to be the same Discovery.\n-   This Discovery doesn’t run if the **Run after** Discovery doesn’t finish, with the exception that the **Even if canceled** check box is selected and the Discovery is canceled.\n\n\n</td></tr><tr><td>\n\nCancel Discovery if longer than\n\n</td><td>\n\nTime limit for running the Discovery. Whecified time elapses, the remaining tasks for the Discovery are canceled even if the Discovery runs unt isn’t finished. If the check box isn’t selected, the Discovery runs until finished. This setting constrains system load to a desirable time window.\n\n</td></tr></tbody>\n</table>8.  Select **Finish** and **Run Now**.\n\n\n## Result\n\nDiscovery runs immediately. Discovery runs at the specified times and adds discovered datacenters to the Logical Datacenters related list.\n\nIf you configured a Discovery schedule, it appears in the Discovery Config - Logical Datacenters related list. To run Discovery on a single datacenter, add the datacenter to the Discovery schedule in the related list, then run Discovery again.\n\nOpen a datacenter record to see the relationships between the datacenter and the resources in the datacenter.\n\n\\[Omitted image \"discovered-datacenter-example.png\"\\] Alt text: Resources in an AWS datacenter\n\n**Note:** By default, Discovery stores the discovered VM hardware types in the Hardware Type \\[cmdb\\_ci\\_compute\\_template\\] table. If you notice an unusually large number of records in this table, use the Cloud Hardware Type \\[cmdb\\_ci\\_cloud\\_hardware\\_type\\] table to store the discovered VM hardware types. For more information, see [Enable the Cloud Hardware Type class extension](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/discovery-and-service-mapping-patterns/enable-hardware-type-class-extension.md). All Cloud Provisioning and Governance features, such as provisioning, quotas, and so on continue to work as is after you switch to the Cloud Hardware Type table.\n\n## What to do next\n\n-   To view discovery status, discovery logs, discovered devices, and the ECC queue, click **Advanced View**.\n-   If Discovery fails, check the Cloud Discovery results on the [Discovery Home page](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/discovery/discovery-home-page.md).\n\n"}}