nerdexam
ServiceNow

CAD · Question #252

Which of the following is a correct method to ensure that a scheduled job only runs during business hours?

The correct answer is C. Use a "Scheduled Script Execution" with a time condition in the script. To ensure a scheduled job runs only during business hours, you can include conditional logic within the scheduled script execution itself to check the current time.

Submitted by viktor_hu· Apr 18, 2026Application Automation

Question

Which of the following is a correct method to ensure that a scheduled job only runs during business hours?

Options

  • AUse a "Business Rule" with a condition on the time of day.
  • BSet the "Run Once" option to only run during business hours.
  • CUse a "Scheduled Script Execution" with a time condition in the script.
  • DDefine business hours in the platform settings and reference them in the script.

How the community answered

(44 responses)
  • A
    9% (4)
  • B
    16% (7)
  • C
    73% (32)
  • D
    2% (1)

Why each option

To ensure a scheduled job runs only during business hours, you can include conditional logic within the scheduled script execution itself to check the current time.

AUse a "Business Rule" with a condition on the time of day.

Business Rules execute based on database operations or record displays, not as standalone scheduled tasks that run at specific times.

BSet the "Run Once" option to only run during business hours.

The 'Run Once' option executes a scheduled job only a single time at a specific date and time, not recurrently within a business hours window.

CUse a "Scheduled Script Execution" with a time condition in the script.Correct

A 'Scheduled Script Execution' (Scheduled Job) allows an administrator to define a script that runs at a specific interval. Incorporating a time condition within this script is the correct method to ensure the job's logic only executes when the current time falls within business hours.

DDefine business hours in the platform settings and reference them in the script.

While business hours can be defined, there isn't a direct platform setting that automatically restricts a scheduled job's execution to those hours without explicit scripting to reference and evaluate them.

Concept tested: Controlling Scheduled Script Execution with time conditions

Source: https://docs.servicenow.com/bundle/utah-application-development/page/script/server-scripting/concept/c_ScheduledJobs.html

Topics

#Scheduled Jobs#Scheduled Script Execution#Scripting#Business Hours

Community Discussion

No community discussion yet for this question.

Full CAD Practice