Delaying in Scheduled Job using gs.sleep() for 2 days

Yash47
Tera Contributor

Hello,
I want to use conditional scheduled job script ( to run on every 2nd and 4th Friday of each month)
after condition returns true, 
want to use some code and after that have to wait for 2 days , I am using gs.sleep(172800000); will it create any impact?
If yes then what should I use instead of gs.sleep();
I am not using gs.eventQueueScheduled(); because the parameters which we have to pass for that , we will get those parameters after delaying for 2 days. 
***NOTE : after that gs.sleep(); I have to use some code in same scheduled job

5 REPLIES 5

I see. But that doesn't seem to qualify for the use of waiting in this manner.

You could run the script/flow daily, and only retrieve those records that qualify according to the "waiting period".

Something like, get all records that are unresponded, and are created 2/4/5 days ago, and send reminders accordingly.