Unable to Create Incident Using Scheduled Job

Hari S1
Tera Contributor

Hi, 

How can I create an incident weekly once using a scheduled job? I have tried, but I'm unable to create the incident from the scheduled job.  please help me?

 

 

Thanks

11 REPLIES 11

Swapna Abburi
Mega Sage
Mega Sage

Hi @Hari S1 

you can try Flow designer for your requirement as scheduled job requires scripting.

 

create a new Flow with trigger type as Schedule and use predefined Flow Action “Create record” to create incident record.

Hi @Hari S1 ,

Which error did you encounter? Can you share a screenshot for better understanding?

Ankur Bawiskar
Tera Patron
Tera Patron

@Hari S1 

share what script did you try and what's the error during creation?

what debugging did you perform?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

Below is the script I am using in the scheduled job. When I click the Execute Now button, the incident is not created, but when I use the same script in the background script, the incident is created successfully.

 

Scheduled Job

 

HariS1_4-1740722536499.png