 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
jeff33190
Joined: 22 Aug 2007 Posts: 96
|
|
JobRun Statement Not Working Correctly |
|
I hate to beat a dead horse, but I have another issue upgrading from 3.4.33 to 5.1.399. We have several jobs that call other jobs from within the JAL script using the JobRun statement. Basically, the job is like this:
Parent Job
JobRun( "Child Job 1")
JobRun( "Child Job 2")
Run miscellaneous commands
End Parent Job
All the jobs are set up to run in the same queue. In version 3.4.33, the Parent job would start, then Child Job 1 would start and complete, then Child Job 2 would start and complete and finally the commands at the end of the Parent Job would run and it would complete.
In the latest version, all 3 jobs run simultaneously, they don't wait for each other to run and complete, which causes multiple problems. These jobs are not Asynchronous.
Thanks,
Jeff
|
|
Wed Apr 17, 2013 5:58 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I think there are several options that can influence behavior of JobRun. But the most important is asynchronous mode. Please verify they are not set to run asynchronous.
|
|
Thu Apr 18, 2013 8:39 am |
|
 |
jeff33190
Joined: 22 Aug 2007 Posts: 96
|
|
|
|
I have re-verified the jobs are not in asynchronous mode. If I manually start the "Child Job 1" without using the JobRun statement and then manually start the "Child Job 2", they both go to the queue and "Child Job 2" waits for "Child Job 1" to complete before starting as expected.
If I call the 2 Child Jobs from within another job using the JobRun statement they run simultaneously.
Thanks
|
|
Thu Apr 18, 2013 8:57 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Please try replacing JobRun( "Child Job 1") with
 |
 |
Dim pid, number
RunAndWait("master.bat /JOB \"Child Job 1\"", "C:\\24x7", 0, pid) |
Does this do the trick?
|
|
Thu Apr 18, 2013 9:59 pm |
|
 |
jeff33190
Joined: 22 Aug 2007 Posts: 96
|
|
|
|
Tried, but it is not kicking off the ChildJob1. Here is what I am seeing in debug.log
**** 4/19/2013 10:19:47 ****
1: DIM
1: Executing DIM("PID", "NUMBER")
2: RUNANDWAIT
2: Executing RUNANDWAIT("c:\appdata\data\24x7\master.bat /JOB "ChildJob1"", "C:\appdata\data\24x7", "0", "0")
Return "2192"
JAL Script finished
2013-04-19 10:19:48,255 [Job #73 - Parent Job] DEBUG com.softtreetech.jscheduler.business.queue.JobQueue - QUEUE_UNLOCKED
|
|
Fri Apr 19, 2013 11:23 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
What do you see in the main debug.log located in the scheduler's folder?
|
|
Fri Apr 19, 2013 1:40 pm |
|
 |
jeff33190
Joined: 22 Aug 2007 Posts: 96
|
|
|
|
The entry above is from the main debug.log
|
|
Mon Apr 22, 2013 8:35 am |
|
 |
|
|
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
|
|
|