ESP dSeries Workload Automation

 View Only
  • 1.  Need to know Argument to pass value information for Pause Job

    Posted May 22, 2020 11:37 AM
      |   view attached
    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


  • 2.  RE: Need to know Argument to pass value information for Pause Job

    Broadcom Employee
    Posted May 27, 2020 06:04 AM
    Hi,

    The arguments to pass will be given to batch file that you have provided in the Command to run.
    If I understand it correctly , you are using .bat file - inside that you are executing the .vbs script that you have pasted in the query above.
    For sleep command inside vbs , if you consume the argument that is taken by .vbs script ,it should sleep for that amount of time.

    Can you please look at the spool file once you run the job to know how it is actually executing.

    Ravi Kiran


  • 3.  RE: Need to know Argument to pass value information for Pause Job

    Posted May 29, 2020 02:34 AM
    Hi Ravi,

    Thanks for your response,
    But if you see the VB scripts its shows the sleep time 8 Sec. Refer below

    WScript.Sleep(04000) 'Sleeps for 8 seconds


  • 4.  RE: Need to know Argument to pass value information for Pause Job

    Broadcom Employee
    Posted Jun 01, 2020 11:31 AM
    Hello,
    You will need to enable echo on in your batch script. Also, enable any debugging in you vbscirpt possible and then run your job again.
    Collect the spool out and show it here.

    Thank you,
    Nitin Pande

    ------------------------------
    Support
    Broadcom
    Toronto
    ------------------------------



  • 5.  RE: Need to know Argument to pass value information for Pause Job

    Posted Jun 01, 2020 11:40 AM
    Buen día
    Si solo quieres tener un SLEEP entre dos Jobs sin aplicar ninguna validación puedes usar en el segundo Job la siguiente opcion: Delay submission when eligible by en minutos

    Segundo_Job
    Yo en partucilar uso un bat SLEEP.com que hace el sleep por segundos, este lo copio a windows/system32
    y en el bat ya solo le indicas los segundos deseados por ejemplo

    Net stop MSDTC
    sleep 10
    Net start MSDTC


    Espero te sea de utilidad la información
    Saludos!!





  • 6.  RE: Need to know Argument to pass value information for Pause Job

    Posted Jun 09, 2020 03:58 PM
    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
    ------------------------------



  • 7.  RE: Need to know Argument to pass value information for Pause Job
    Best Answer

    Broadcom Employee
    Posted Jun 09, 2020 04:39 PM
    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" 

    Don