cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
796
Views
3
Helpful
4
Replies

How do you create a time delay in a custom task?

I've tried playing around with setTimeout(function,ms); but when I execute it says "setTimeout" is not defined.

1 ACCEPTED SOLUTION

Accepted Solutions
Orf Gelbrich
Cisco Employee

Take a look how the wait was done here

https://communities.cisco.com/docs/DOC-65385

View solution in original post

4 REPLIES 4
Orf Gelbrich
Cisco Employee

Take a look how the wait was done here

https://communities.cisco.com/docs/DOC-65385

View solution in original post

its also here:

https://www.cisco.com/c/dam/en/us/td/docs/unified_computing/ucs/ucs-director/cloupia-script-cookbook/5-0/CloupiaScript-C…

just CTRL-F for "sleep"... RTFM right?

answer is...

Be sure you import these...

importPackage(java.util);
importPackage(java.lang);
and then sleep with this...

Thread.sleep(millisecond#);

This section here…

var milliseconds = delaySecondsBetweenInvocation * 1000;

Thread.sleep(milliseconds);

what is the best way to maintain one schedule for a group of jobs, but have the job group start 1-2 hours later on Sundays?  i do not want to duplicate the job group (too many jobs to maintain).

Content for Community-Ad
This widget could not be displayed.