Create Recurring tasks using eventQueueSchedule in servicenow

Aruna13
Tera Contributor

Hi All,

 

I have one requirement where end user wants to create a recurring requests in custom table. For example, if users wants to create recurring request on 1st of every month until Dec 2025, around 14 tasks should be created on first of every month automatically. We are planning to receive input details like start and stop date/time and when it has to be repeated(weekly/monthly/yearly) and until when(specific date) it has to create request. 

 

Currently we are planning to do it using events and script actions but i am still stuck like how to trigger the event and script actions . For getting user's inputs, we are planning to use record producers, since it has to create the request in the custom table. Also, if user doesnt want to create any tasks in the upcoming days, then we are planning to have UI action to get the dates when the request creation should be stopped and sent to event, so that event will not fire on those days.

 

Can anyone please guide me how I can achieve that and some scripts also, since I doing this activity for the first time.

 

Thanks,

Aruna Meenakshi S

5 REPLIES 5

1. Try System Definition > Templates. From the list view, click the New button or select an existing template (skip to 4).

 

2. Provide the template a name and choose the table it should target.

 

3. The template area should populate so that you can add and choose fields and enter the value you would like to be filled in. When done, click the hamburger (more options) and choose save. You can choose to share it with a group.

 

4. Click the schedule button. **To provide this ability to a user give them the 'template_scheduler' role.

 

You should be taken to a screen where you can configure the frequency of the scheduled job, which will create the "recurring" task based on the schedule.

 

Link to ServiceNow Documentation: https://docs.servicenow.com/bundle/xanadu-platform-administration/page/administer/reference-pages/ta...

 

Hope this helps.