<h2>Create or schedule a data collection job</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="task" /><meta name="DC.title" content="Create or schedule a data collection job" /><meta name="abstract" content="Schedule a data collection job to regularly collect Performance Analytics indicator scores and snapshots." /><meta name="description" content="Schedule a data collection job to regularly collect Performance Analytics indicator scores and snapshots." /><meta name="DC.subject" content="data collection job, creating" /><meta name="keywords" content="data collection job, creating" /><meta name="DC.relation" scheme="URI" content="../../../use/performance-analytics/concept/c_ClctData.html" /><meta name="DC.relation" scheme="URI" content="../../../use/performance-analytics/concept/c_performanceAnalyticsAndReporting.html" /><meta name="DC.relation" scheme="URI" content="../../../use/performance-analytics/concept/r_PALandingPage.html" /><meta name="DC.relation" scheme="URI" content="../../../use/performance-analytics/concept/c_PADataArchitecture.html" /><meta name="DC.contributor" content="josephinesne.sokkula" /><meta name="DC.contributor" content="courtney.bradwell" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2023-08-03" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="t_CreatASchedDataCollJob" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Create or schedule a data collection job</title></head><body id="t_CreatASchedDataCollJob"> <div class="breadcrumb"><a class="link" href="../../../use/performance-analytics/concept/c_performanceAnalyticsAndReporting.html" title="Optimize processes and increase productivity with Reporting, Performance Analytics, User Experience Analytics, and Process Mining. Present data in either the Core UI or the Next Experience UI Framework.">Analyze and optimize business processes</a> > <a class="link" href="../../../use/performance-analytics/concept/r_PALandingPage.html" title="ServiceNow Performance Analytics is an in-platform process optimization solution to create management dashboards, report on KPIs and metrics, and answer key business questions to help increase quality and reduce the costs of service delivery.">Performance Analytics</a> > <a class="link" href="../../../use/performance-analytics/concept/c_PADataArchitecture.html" title="Define key metrics and data structure to generate scores.">Configure Performance Analytics advanced features</a> > </div> <h1 class="title topictitle1" id="ariaid-title1">Create or schedule a data collection job</h1> <div class="body taskbody"><p class="shortdesc">Schedule a data collection job to regularly collect <span class="ph">Performance Analytics</span> indicator scores and snapshots.</p> <div class="section prereq p"> <p class="p">Before defining data collection jobs, make sure that indicator sources, breakdown sources, and indicators have been defined. Otherwise, jobs cannot return any results.</p> <p class="p">Roles required: pa_data_collector or admin</p> </div> <div class="section context" id="t_CreatASchedDataCollJob__context_pwh_zqt_qbb"> <div class="p">The important items to know when you configure a data collection job are:<ul class="ul" id="t_CreatASchedDataCollJob__ul_qyh_crt_qbb"><li class="li">Collection period</li><li class="li">Collection timezone</li><li class="li">Collected scores domain, if domains are used.</li><li class="li">The collection job runs without any restrictions. It does not use the permissions of the user who runs it.</li></ul> </div> <p class="p">Data collection jobs run different steps to collect scores and to collect text analytics data. By default, jobs collect both types of data. To improve performance, you can instead schedule separate jobs for scores and for text analytics data.</p> </div> <ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">Navigate to <span class="ph menucascade"><span class="ph uicontrol">All</span> > <span class="ph uicontrol">Performance Analytics</span> > <span class="ph uicontrol">Data Collector</span> > <span class="ph uicontrol">Jobs</span></span> and click <span class="ph uicontrol">New</span>.</span> <div class="itemgroup info">You can instead edit an existing data collection job, for example to change the schedule of when the job runs. In this case, navigate to <span class="ph menucascade"><span class="ph uicontrol">Performance Analytics</span> > <span class="ph uicontrol">Data Collector</span> > <span class="ph uicontrol">Jobs</span></span> and click the job name.</div> </li><li class="li step stepexpand"> <span class="ph cmd">In the <span class="ph uicontrol">Name</span> field, give the job a meaningful name.</span> <div class="itemgroup info">Follow a standard format for naming data collector jobs, such as [PA Indicator] Daily Data Collection, [PA Indicator] Historic Data Collection... </div> </li><li class="li step stepexpand"> <span class="ph cmd">In the <span class="ph uicontrol">Operator</span> field, select whether to collect data for an absolute or a relative time period.</span> <table border="1" frame="hsides" rules="rows" cellpadding="4" cellspacing="0" summary="" class="simpletable choicetable choicetableborder" id="t_CreatASchedDataCollJob__choicetable_y4r_n1h_4bb"><colgroup><col style="width:50%" /><col style="width:50%" /><table><thead><tr class="sthead chhead"><th class="stentry choptionhd" style="vertical-align:bottom;text-align:left;" id="d124186e145-option">Operator value</th><th class="stentry chdeschd" style="vertical-align:bottom;text-align:left;" id="d124186e145-desc">Description</th></tr></thead><tbody><tr class="strow chrow"><th style="vertical-align:top;" headers="d124186e145-option" id="d124186e158" class="stentry choption">Fixed</th><td style="vertical-align:top;" headers="d124186e145-desc d124186e158" class="stentry chdesc">Collects data for an absolute time period.</td></tr><tr class="strow chrow"><th style="vertical-align:top;" headers="d124186e145-option" id="d124186e167" class="stentry choption">Relative</th><td style="vertical-align:top;" headers="d124186e145-desc d124186e167" class="stentry chdesc">Collect data for a period of time that is relative to the time when the job is run. </td></tr></tbody></table><ul><li class="li step stepexpand"> <span class="ph cmd">If you selected <span class="ph uicontrol">Fixed</span> as the operator, select the <span class="ph uicontrol">Fixed start</span> date and the <span class="ph uicontrol">Fixed end</span> date.</span> </li><li class="li step stepexpand"> <span class="ph cmd">If you selected <span class="ph uicontrol">Relative</span> as the operator, specify the intervals prior to the run time to collect data from.</span> <ol type="a" class="ol substeps" id="t_CreatASchedDataCollJob__substeps_vr2_gch_4bb"><li class="li substep substepexpand"> <span class="ph cmd">In the fields <span class="ph uicontrol">Relative start</span> and <span class="ph uicontrol">Relative start interval</span>, set the number and the length, respectively, of time periods in the past to begin to collect data from.</span> </li><li class="li substep substepexpand"> <span class="ph cmd">In the fields <span class="ph uicontrol">Relative end</span> and <span class="ph uicontrol">Relative end interval</span>, set the number and the length, respectively, of the last period in the past to collect data from.</span> <div class="itemgroup info"> <div class="note tip"><span class="tiptitle">Tip:</span> <ul class="ul" id="t_CreatASchedDataCollJob__ul_r5w_mcx_2nb"><li class="li">Most indicators, and therefore most data collection jobs, run Daily. Daily scheduled jobs normally should collect for the most recently completed day. Therefore, they should have both a relative start and relative end of one day ago. Run historical data collection jobs, which have longer collection periods, only once.</li><li class="li">If you plan to use this job with indicators that use business calendars, consider the <span class="ph uicontrol">periods ago</span> interval. This interval is based on the periods that are defined for a business calendar.</li></ul> </div> </div> <div class="itemgroup stepxmp">For example, you want to collect scores for a set of several new indicators with a daily frequency, all using the same indicator source. First you create a historical data collection job that collects data from two months ago up to the day before yesterday. For this job, enter <span class="ph uicontrol">60</span> in <span class="ph uicontrol">Relative start</span> and <span class="ph uicontrol">days ago</span> in <span class="ph uicontrol">Relative start interval</span>. Enter <span class="ph uicontrol">2</span> in <span class="ph uicontrol">Relative end</span> and <span class="ph uicontrol">days ago</span> in <span class="ph uicontrol">Relative end interval</span>. Set the <span class="ph uicontrol">Run</span> field to <span class="ph uicontrol">On Demand</span>. Click <span class="ph uicontrol">Execute now</span> and run this job once, to collect the initial scores. <p class="p">Create a second job with relative start and end of 1 day ago and set the <span class="ph uicontrol">Run</span> field to <span class="ph uicontrol">Daily</span>. Activate this job to collect the scores for yesterday and all future scores for the day before the job is run.</p> </div> </li></ol> </li><li class="li step stepexpand"> <span class="ph cmd">Fill in the <span class="ph uicontrol">Job parameters</span>, as appropriate.</span> <div class="itemgroup info"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="t_CreatASchedDataCollJob__tbl_PerformanceAnalyticsDataCollectionJobProperties" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d124186e313">Job parameter</th><th class="entry cellrowborder" style="vertical-align:top;" id="d124186e316">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Run as</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">For domain separated instances, select the user that runs this job. The job collects scores from facts table and <span class="ph">Performance Analytics</span> records that have either the Global domain or are in the domain of this user. <p class="p">The data collection job follows only the domain, not the permissions of this user. ACLs and business rules do not apply to data collection jobs. Any user can run the job.</p> <div class="p"><div class="note important"><span class="importanttitle">Important:</span> If you select a domain configuration for this job, it overrides the <span class="ph uicontrol">Run as</span> user. See Step <a class="xref" href="t_CreatASchedDataCollJob.html#t_CreatASchedDataCollJob__step_domain-config">9</a> in this topic.</div> </div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Run as tz</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">Select the time zone that the queries use when they are executed from the job. Use the reporting time zone of your company if one exists. By default the System time zone is used. <p class="p">This time zone determines what day is "Today" for conditions like [[Opened][on][Today]].</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Active</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">If selected, as it is by default, the data collection occurs at the scheduled date and time.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Run</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">Select the schedule for collecting the data. Choices are: <ul class="ul" id="t_CreatASchedDataCollJob__ul_err_n2v_hp"><li class="li">Daily</li><li class="li">Weekly</li><li class="li">Monthly</li><li class="li">Periodically</li><li class="li">Once</li><li class="li">On demand</li></ul> <div class="p">If you are using business calendars, you also have these options, for the start and end of the business calendar period (See <a class="xref" href="../administer/time/task/define-business-calendar-entries.html" target="_blank" rel="noopener noreferrer">Define business calendar entries</a>):<ul class="ul" id="t_CreatASchedDataCollJob__ul_f55_v4d_4mb"><li class="li">Business calendar: Entry start</li><li class="li">Business calendar: Entry end</li></ul> </div> <p class="p">If you are creating a historical data collection job, schedule the job to run On demand.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Day</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 "><ul class="ul" id="t_CreatASchedDataCollJob__ul_lkx_k2v_hp"><li class="li">If <span class="ph uicontrol">Run</span> is <span class="ph uicontrol">Weekly</span>, specify the day of the week.</li><li class="li">If <span class="ph uicontrol">Run</span> is <span class="ph uicontrol">Monthly</span>, specify the day of the month.</li></ul> <p class="p">To collect at the end of the month, set for day 1 and set <span class="ph uicontrol">Time</span> to soon after midnight. This setting collects data for a completed month regardless of the length of the month.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Repeat Interval</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">If <span class="ph uicontrol">Run</span> is <span class="ph uicontrol">Periodically</span>, specify the amount of time between scheduled data collections, in days and hour.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Starting</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">If <span class="ph uicontrol">Run</span> is <span class="ph uicontrol">Periodically</span> or <span class="ph uicontrol">Once</span>, specify the date and time of the first scheduled data collection.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Time</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">Time that the job runs, on 24 hour clock. Field appears after <span class="ph uicontrol">Active</span> is selected.<div class="p"><ul class="ul" id="t_CreatASchedDataCollJob__ul_l3k_gts_yjb"><li class="li">Time based on the time zone for your user session, not the <span class="ph uicontrol">Run as tz</span> time zone.</li><li class="li">Generally set for an hour between midnight and 6 am at your company, to collect the last complete period.</li></ul> </div> <p class="p">For example, if you are in New York and want to collect data at 5 am for your company that is on Los Angeles time, set the time to 08:00:00.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Collect</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">Data collection jobs have separate steps for collecting scores and for collecting text analytics. Select one of:<ul class="ul" id="t_CreatASchedDataCollJob__ul_hqv_2sl_sbb"><li class="li">Scores only</li><li class="li">Text index only</li><li class="li">Both scores and text index (default)</li></ul> <p class="p">For more information, see <a class="xref" href="set-up-text-analytics.html" title="Select the text fields to analyze and which indicators to analyze.">Set up text analytics</a>.</p> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Conditional</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 ">If checked, the data collection occurs only if certain conditions are met.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e313 ">Conditions</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d124186e316 "><span class="ph">Conditional script that determines if a scheduled job should run. The last expression of the script should evaluate to a Boolean (true/false) value. This text box appears only if you select <span class="ph uicontrol">Use conditions</span>.</span> <div class="note warning"><span class="warningtitle">Warning:</span> Conditional scripts for <span class="ph">Performance Analytics</span> data collection jobs are executed in the sandbox. Therefore, function definitions are not allowed. Some API calls and keywords are also not allowed. For more information, see <a class="xref" href="../administer/security/reference/r_ScriptSandboxing.html" target="_blank" rel="noopener noreferrer">Script sandbox property</a>. <p class="p">After upgrade, jobs with conditional scripts that contain these disallowed API components will conclude with "Collected with errors." These jobs do not collect scores.</p> <p class="p">The <code class="ph codeph">com.snc.pa.dc.script.use.sandbox</code> system property controls whether data collection scripts use the sandbox. Only users with the security_admin role can modify this property. Exercise caution when turning off this property. When set to false, unauthorized users may be able to execute malicious actions on your instance.</p> </div> </td></tr></tbody></table> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Right-click the form header and select <span class="ph uicontrol">Save</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the <span class="ph uicontrol">Indicators</span> related list, click <span class="ph uicontrol">Edit</span> and select the indicators that this job collects data for.</span> <div class="itemgroup info"> <div class="note important"><span class="importanttitle">Important:</span> <ul class="ul" id="t_CreatASchedDataCollJob__ul_orp_4lc_r3b"><li class="li">Include at least one indicator for the job. Otherwise, the job cannot return any results.</li><li class="li">To help keep jobs maintainable, try not to associate an indicator with more than one active collection job unless you have a clear use case. If you are trying to get real-time data, consider using a real-time indicator.</li><li class="li">The data collection job produces one database query for each indicator source for the associated indicators. Thus the data for all indicators that share an indicator source represent the same point in time.</li></ul> </div> </div> </li><li class="li step stepexpand" id="t_CreatASchedDataCollJob__step_domain-config"> <span class="ph cmd">If you have enabled domain configurations, you can select a domain configuration to associate with this job in the <span class="ph uicontrol">Domain configurations</span> related list.</span> <div class="itemgroup info">Domain configurations are grouping of domains based on their visibility to a user group or other condition. These groupings can include parent-child relationships. If you select a domain configuration for a job, the job collects scores for records in the domains of the configuration, including the global domain. Domain configurations override the <span class="ph uicontrol">Run as</span> user. For more information, see <a class="xref" href="../concept/pa-domain-separation-msp.html" title="Instead of configuring Performance Analytics for the domains of a specific user, create a reusable domain configuration. Select domains that are visible to a group of users, or filter domains directly. Domain configurations let you define hierarchical relationships and aggregate scores across multiple domains.">Grouping domains in Performance Analytics domain configurations</a>.</div> </li><li class="li step stepexpand"> <span class="ph cmd">Click <span class="ph uicontrol">Submit</span>.</span> </li><li><div class="section postreq" id="t_CreatASchedDataCollJob__postreq_vnr_zlh_4bb"> <ul class="ul" id="t_CreatASchedDataCollJob__ul_jbf_mph_4bb"><li class="li">By default, for each job indicator, data is collected for all breakdowns and the indicator itself. To change this configuration for an indicator, see <a class="xref" href="configure-job-indicator.html" title="Increase the efficiency of data collection by configuring job indicators to collect only necessary and sensible data.">Configure a job indicator</a>.</li><li class="li">If you have enabled domain support, you have a related list named <span class="ph uicontrol">Domain configuration</span>. In this tab, click <span class="ph uicontrol">Edit</span> to relate an existing domain configuration with this job or click <span class="ph uicontrol">New</span> to create a new domain configuration. For more information, see <a class="xref" href="create-domain-configuration.html" title="Create a domain configuration to define which domains to collect scores from and how to store scores within the domain hierarchy.">Create a domain configuration</a>.</li></ul> </div> <div class="related-links"> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../use/performance-analytics/concept/c_ClctData.html" title="Performance Analytics uses data collection jobs to collect and clean scores and snapshots. You can also set indicator scores manually.">Collecting indicator scores</a></div> </div> </div> </li></ul></colgroup></table></li></ol></div></body></html></div>