How to create a catalog item from scheduled job

shaikimran4
Tera Contributor

I have a requirement to create a catalog item bi-weekly automatically without manual intervention. I am trying this logic in scheduled Job, but it is working. but when I try in Background scripts it is working as expected.

 

var cart = new sn_sc.CartJS();
var newItem = cart.addToCart({
    "sysparm_id": "04b7e94b4f7b4200086eeed18110c7fd",
    "sysparm_requested_for": "62826bf03710200044e0bfc8bcbe5df1",
    "variables":{
        "acrobat": "true",
        "photoshop": "false",
        "Additional_software_requirements": "testing the software"
    }
});
var checkoutInfo = cart.checkoutCart();
 
 
Can someone help me out on this.
6 REPLIES 6

Dr Atul - LNG
Tera Patron

Hi @shaikimran4 

 

It’s better to use the flow designer, which is low-code and fully automated

 

https://www.servicenow.com/community/developer-forum/creating-a-request-requested-item-from-flow-des...

@Dr Atul - LNG we can use flow designer for this requirement. but we need to trigger that "bi-weekly" - only on even Mondays. In scheduled job we can use scripted conditions

Yes mate, Flow designer is best to go.

do we need to use custom action step after trigger condition to validate even Mondays