Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Collect Spotlight scores

Log in to subscribe to topics and get notified when content changes.

Collect Spotlight scores

A single Spotlight job collects scores for all active Spotlight groups. You can execute this job manually. An administrator can have it execute automatically according to a schedule.

Before you begin

As an administrator, you can schedule the collection of Spotlight scores. For each Spotlight group whose scores you want to collect:
  • Ensure that the group is activated. On the Spotlight Group form of each group, Active must be selected.
  • Ensure that you have correctly set whether to collect scores from a snapshot, or to collect real-time scores.
  • If you are evaluating a snapshot of records for a Spotlight group, ensure that the following conditions are true:
    • Collect Recordsis enabled for the Main indicator of the group.
    • The Performance Analytics data collection job has run for the Main indicator of the group.

For more information, see Create a Spotlight group.

Role required: admin (to set up schedule), pa_spotlight (to run manually)

About this task

Any user with the pa_spotlight role can manually run a job to collect scores. Navigate to Spotlight > Spotlight Job and click Execute now.
  • If you are evaluating a snapshot of records, collected these scores as soon as possible after the data collection jobs run for the indicators of the Spotlight groups. Otherwise the data can be stale or meaningless.
  • When you collect scores, all previously created Snapshot records are deleted for all Snapshot groups.


  1. Navigate to Spotlight > Spotlight Job.
  2. Select Active.
    Fields appear for scheduling the Spotlight job.
  3. In the Run field, select the frequency with which the Spotlight job runs.
    Different scheduling fields appear depending on the run frequency that you select.
  4. Fill in the scheduling fields, such as Time.
    If you have any Spotlight groups that use a snapshot of records, schedule the Spotlight group job to run after the data collection jobs for the main indicators of those groups. Scheduling the Spotlight jobs after the data collection jobs ensures that Spotlight evaluations are up-to-date and meaningful.
  5. (Optional) Select Conditional to allow the scores to be collected only under conditions that you specify in a script.
    See the example of such a script after these steps.
  6. (Optional) In the Run this script field, specify a custom Spotlight evaluation script to run.
    By default, the provided Spotlight evaluation script is specified in this field. Do not alter this field unless you have a custom run script.

Example: Conditional script for scheduling a job

This example script runs the scheduled job only if there are active Incidents older than 30 days.

// Only run this Scheduled Job if there are active Incidents over 30 days old
var ga = new GlideAggregate('incident');
ga.addQuery('active', 'true');
ga.addQuery('sys_created_on', '<', gs.daysAgo(30));
ga.getAggregate('COUNT') !== '0'