Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How to setup a recurring task, assigned to a group, for a catalog item

MIcheleWilliams
Tera Contributor

How do you create a scheduled recurring task, assigned to a group, for a catalog item?  I went to System Definition/ Templates, selected the table, Groups, and template variables.  Selected Schedule to run daily.  I saw an entry in Scheduled Jobs for the template.  How do I execute the scheduled job?  How can I tell if the scheduled job ran? Can a scheduled recurring task be setup using flow designer?

1 REPLY 1

VirendraM
Tera Contributor

I would recommend to use flow action or Subflow, you can create task by calling dedicated action name "create catalog task" and also leverage wait option. This keeps the logic centralized and reusable for catalog items.

 

If you really need this by template only, you can call a script from the flow, either as an inline script or through a custom Flow Action.

var grRec = new GlideRecord("sc_task");
grRec.initialize();
grRec.applyTemplate("TEMPLATE3");
grRec.insert();