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
Any user with the pa_spotlight role can manually run a job
to collect scores. Navigate to and click Execute now.
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.
required: admin (to set up schedule), pa_spotlight (to run manually)
- 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.
Fields appear for scheduling the Spotlight job.
In the Run field, select the frequency with which the
Spotlight job runs.
Different scheduling fields appear depending on the run frequency that
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
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.
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
// Only run this Scheduled Job if there are active Incidents over 30 days old
var ga = new GlideAggregate('incident');
ga.addQuery('sys_created_on', '<', gs.daysAgo(30));
ga.getAggregate('COUNT') !== '0'