Scheduled Jobs every 6 months

John H1
Tera Guru

I have a job that needs to be run on Jan 6th and July 6th.

 

How can I configure a Scheduled Job to meet that requirement.

1 ACCEPTED SOLUTION

Rahul Kumar17
Tera Guru

Hi,

You can configure a Scheduled Job to run on specific dates, such as January 6th and July 6th. To achieve this, follow these steps:

  1. Create a Scheduled Job:

    • Log in to your ServiceNow instance as an administrator.
    • In the navigation menu, type "Scheduled Jobs" in the search bar and select "Scheduled Jobs."
    • Click on "New" to create a new Scheduled Job record.
  2. Configure the Scheduled Job:

    • Provide a name and description for the Scheduled Job.
    • In the "Run" field, select "Recurring."
    • Choose the appropriate interval. In your case, you want the job to run twice a year, so select "Months" and set the interval to "6."
  3. Define the Run Conditions:

    • In the "Conditions" section, you will define the specific dates on which the job should run.
    • Click on the "Add" button to create a new condition.
    • Set the "Type" to "Run Once On Date."
    • For the "Date" field, select the date January 6th (01-06) for the first condition.
    • Click "Submit" to add the condition.
    • Repeat the process to add another condition for the date July 6th (07-06).
  4. Select the Script or Business Logic:

    • In the "Script" section, provide the script or business logic that you want the Scheduled Job to execute on the specified dates.
    • Write the script code or reference a script include, business rule, or script action, depending on your requirements.
  5. Save and Activate:

    • Once you have configured the Scheduled Job and added the desired script or business logic, click "Submit" to save the record.
    • Activate the Scheduled Job by setting the "Active" field to "true."
  6. Monitor and Test:

    • Monitor the Scheduled Job execution logs to ensure that it runs as expected on January 6th and July 6th.
    • You can access the execution logs by clicking on the "Scheduled Job Logs" related link on the Scheduled Job record.

By following these steps, you will have configured a Scheduled Job that runs on the specified dates of January 6th and July 6th. Make sure to thoroughly test the job in a non-production environment before implementing it in a live environment.

 

Thanks,

Rahul Kumar

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar

View solution in original post

2 REPLIES 2

bammar
Kilo Sage
Kilo Sage

Safest and most simple bet is to make 2 one that runs every year on jan 6 and the other on July 6. If you try to do it in one could be sort of complicated even with a script and if you say start on jan 6 and repeat every 182 days or so it may not fall exactly on those dates if they need to be exact. 

Rahul Kumar17
Tera Guru

Hi,

You can configure a Scheduled Job to run on specific dates, such as January 6th and July 6th. To achieve this, follow these steps:

  1. Create a Scheduled Job:

    • Log in to your ServiceNow instance as an administrator.
    • In the navigation menu, type "Scheduled Jobs" in the search bar and select "Scheduled Jobs."
    • Click on "New" to create a new Scheduled Job record.
  2. Configure the Scheduled Job:

    • Provide a name and description for the Scheduled Job.
    • In the "Run" field, select "Recurring."
    • Choose the appropriate interval. In your case, you want the job to run twice a year, so select "Months" and set the interval to "6."
  3. Define the Run Conditions:

    • In the "Conditions" section, you will define the specific dates on which the job should run.
    • Click on the "Add" button to create a new condition.
    • Set the "Type" to "Run Once On Date."
    • For the "Date" field, select the date January 6th (01-06) for the first condition.
    • Click "Submit" to add the condition.
    • Repeat the process to add another condition for the date July 6th (07-06).
  4. Select the Script or Business Logic:

    • In the "Script" section, provide the script or business logic that you want the Scheduled Job to execute on the specified dates.
    • Write the script code or reference a script include, business rule, or script action, depending on your requirements.
  5. Save and Activate:

    • Once you have configured the Scheduled Job and added the desired script or business logic, click "Submit" to save the record.
    • Activate the Scheduled Job by setting the "Active" field to "true."
  6. Monitor and Test:

    • Monitor the Scheduled Job execution logs to ensure that it runs as expected on January 6th and July 6th.
    • You can access the execution logs by clicking on the "Scheduled Job Logs" related link on the Scheduled Job record.

By following these steps, you will have configured a Scheduled Job that runs on the specified dates of January 6th and July 6th. Make sure to thoroughly test the job in a non-production environment before implementing it in a live environment.

 

Thanks,

Rahul Kumar

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar