Hi
Just a thought.
I like the "Delay submission when eligible" suggestion best but that time is in Minutes.
To pass in a variable to a .bat file use the %1 to get the first argument defined in the job definition. I use the line below in the .bat file. This pings an IP address and waits for the number of seconds before it completes. .
ping -n %1 127.0.0.1 >nul
There are a few other options and not all of them work on every windows server version.
choice /c ync /t 5 /d n
To pass the argument use the %1 for the value to wait. This command prompts the user for a response and only wait x seconds for the reply.
choice /c ync /t %1 /d n********************************************************************************************************************
Below is an example how to pass a argument into a VBScript.
Dim Arg, var1, var2
Set Arg = WScript.Arguments
'Parameter1, begin with index0
var1 = Arg(0)
Then use the var1 in the program.
Let me know if I "missed the boat"
2¢
Don
Original Message:
Sent: 06-09-2020 03:58 PM
From: Andy Reimer
Subject: Need to know Argument to pass value information for Pause Job
We have always used sleep.exe (https://ss64.com/nt/sleep.html) which takes an argument in seconds. I always thought it was a standard part of Windows but I know see it was actually included as part of the 2003 Resource Kit. I'm sure you can still find a copy somewhere if you need. It can be called as part of a script or, as is my preference, called directly.
At any rate, it is reliable.
------------------------------
Andy Reimer
Original Message:
Sent: 05-22-2020 11:37 AM
From: pardeep kumar
Subject: Need to know Argument to pass value information for Pause Job
Hi Team,
I have a scenario, where we have to embed one pause job between 2 jobs for particular time delay(in Seconds only). I have already an example which i will show you in my screenshot.
Also i have a ready VB script as well. But i have some confusion while you are defining " Argument to pass in your window Pause Job" In my screenshot there is mentioned only 12000 in "argument to pass".
My concern is only how we are defining " Argument to pass in window Pause Jobs" . Could you please help us....
Here is VB code which we are referring. So you can take a look
' *********************************************************************
' * Description: This program is to pause
' * Usage: PAUSE.vbs
' *********************************************************************
Set ArgObj=Wscript.Arguments
Dim objArgs: Set objArgs = WScript.Arguments
WScript.Sleep(04000) 'Sleeps for 8 seconds
returnValue = 0
WScript.Echo(returnValue)
WScript.Quit(returnValue)
'Exit Script
WScript.Quit(returnValue)
Regards,
Pardeep