SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
JALScript.Execute - Job A does not wait for Jo

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
JALScript.Execute - Job A does not wait for Jo
Author Message
Jim Malone



Joined: 23 Oct 2000
Posts: 23

Post JALScript.Execute - Job A does not wait for Job B Reply with quote

Job A does not wait for Job B to complete:

Job A (VBS):
Sub Main
JALScript.Execute "JobRun ""215"""
Msgbox "hello",64, "header"
End Sub

Job B (JAL):
dim bol_number, string
dim File_Handle, number
FileReadLine( "D:\\24x7\\BCCTemp.txt", 1, BOL_Number )
Wait( 1 )
messagebox( BOL_Number )
FileOpen( "D:\24x7\BCCTemp.txt", "LineMode", "Write", False, File_Handle)
FileWrite( File_Handle, "test" )
FileClose( File_Handle )
FileReadLine( "D:\\24x7\\BCCTemp.txt", 1, BOL_Number )
Wait( 1 )
messagebox( BOL_Number )

: If you want job A to wait for job B to complete use either

: JALScript.Execute("JobRun [job id]")

: or

: Set shell = CreateObject("WScript.Shell")
: shell.Run "24x7.exe /JOB [job id]", 0, 1

: If you do not want job A to wait then simply do

: Set shell = CreateObject("WScript.Shell")
: shell.Run "24x7.exe /JOB [job id]", 0, 0


Wed Jun 18, 2003 2:40 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6499

Post Re: JALScript.Execute - Job A does not wait for Jo Reply with quote

Are these jobs setup to run synchronous or asynchronous?

: Job A does not wait for Job B to complete: Job A (VBS): Sub Main
: JALScript.Execute "JobRun ""215"""
: Msgbox "hello",64, "header"
: End Sub

: Job B (JAL): dim bol_number, string
: dim File_Handle, number
: FileReadLine( "D:\\24x7\\BCCTemp.txt", 1, BOL_Number )
: Wait( 1 )
: messagebox( BOL_Number )
: FileOpen( "D:\24x7\BCCTemp.txt", "LineMode",
: "Write", False, File_Handle)
: FileWrite( File_Handle, "test" )
: FileClose( File_Handle )
: FileReadLine( "D:\\24x7\\BCCTemp.txt", 1, BOL_Number )
: Wait( 1 )
: messagebox( BOL_Number )

Wed Jun 18, 2003 3:24 pm View user's profile Send private message
Jim Malone



Joined: 23 Oct 2000
Posts: 23

Post Re: JALScript.Execute - Job A does not wait for Jo Reply with quote

Job A won't run unless it's asynchronous (otherwise 24x7 locks up).
Job B I tried both ways and Job A still finishes before Job B.

: Are these jobs setup to run synchronous or asynchronous?

Wed Jun 18, 2003 3:57 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6499

Post Re: JALScript.Execute - Job A does not wait for Jo Reply with quote

Please upgrade to 3.4.9 this will fix the hanging issue. For more info please see "Cross-Language Calls Hang... Sometimes" message thread for more info http://www.softtreetech.com/cgi_bin/config.cgi?read=3908

: Job A won't run unless it's asynchronous (otherwise 24x7 locks up).
: Job B I tried both ways and Job A still finishes before Job B.

Wed Jun 18, 2003 6:32 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6499

Post Re: JALScript.Execute - Job A does not wait for Jo Reply with quote

Please see my response in the previous thread.

: Job A does not wait for Job B to complete: Job A (VBS): Sub Main
: JALScript.Execute "JobRun ""215"""
: Msgbox "hello",64, "header"
: End Sub

: Job B (JAL): dim bol_number, string
: dim File_Handle, number
: FileReadLine( "D:\\24x7\\BCCTemp.txt", 1, BOL_Number )
: Wait( 1 )
: messagebox( BOL_Number )
: FileOpen( "D:\24x7\BCCTemp.txt", "LineMode",
: "Write", False, File_Handle)
: FileWrite( File_Handle, "test" )
: FileClose( File_Handle )
: FileReadLine( "D:\\24x7\\BCCTemp.txt", 1, BOL_Number )
: Wait( 1 )
: messagebox( BOL_Number )

Wed Jun 18, 2003 6:32 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.