- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 01:58 PM
I am working on a workflow to automate the onboarding of AWS Cloud management. I am trying to create a Run script in my WF that will create a Discovery schedule, I am struggling to find the correct syntax to add the "time" via the script.
Any help would be appreciated!
Solved! Go to Solution.
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 03:01 PM
Ok, so looking at the discovery_schedule table, run_time is a GlideTime.
Based on that, and a little tinkering, I think I would do this:
var SECS = 1000;
var MINS = 60 * SECS;
var HOURS = 60 * MINS;
disSched.run_time = new GlideTime(5 * HOURS).getValue();
or
var gt = new GlideTime();
gt.seValue("05:00:00");
disSched.run_time = gt.getValue();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 07:56 PM
run_time is the number of hours, minutes and seconds since 1970-01-01 08:00:00,
If you set the time on the form to 01:00:00, then run_time will be 1970-01-01 09:00:00