SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
JobRun Statement Not Working Correctly

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
JobRun Statement Not Working Correctly
Author Message
jeff33190



Joined: 22 Aug 2007
Posts: 96

Post JobRun Statement Not Working Correctly Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
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 View user's profile Send private message
jeff33190



Joined: 22 Aug 2007
Posts: 96

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
Please try replacing JobRun( "Child Job 1") with
Code:
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 View user's profile Send private message
jeff33190



Joined: 22 Aug 2007
Posts: 96

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
What do you see in the main debug.log located in the scheduler's folder?
Fri Apr 19, 2013 1:40 pm View user's profile Send private message
jeff33190



Joined: 22 Aug 2007
Posts: 96

Post Reply with quote
The entry above is from the main debug.log
Mon Apr 22, 2013 8:35 am 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.