Scheduled Job running twice instead of once
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:36 PM
Hello Experts,
I have created the below scheduled job with script to create a RITM that runs once every month. But, When I click "Execute Now" button it creates only one RITM but, every month it creates 2 RITM records. What could be the issue?
Script:
(function() {
var date = new Date();
var month = '0' + (date.getMonth() + 1);
var cart = new Cart();
var item = cart.addItem("25v5g226td2c6h26t5316624bcb26");
cart.setVariable(item, "u_short_description", "XXX");
cart.setVariable(item, "u_description", "XXX");
cart.setVariable(item, "requested_for","e80vatg6dbgtd238082cc31239e7c9615f");
cart.placeOrder();
})();
Thanks,
Rocky.
- Labels:
-
Script Debugger
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 03:56 PM
Hi Rocky,
Please check this link if that could be the issue.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0869856
Mark Correct or Helpful if it helps.
***Mark Correct or Helpful if it helps.***