SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Dynamic Job issue in 3.4.21

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Dynamic Job issue in 3.4.21
Author Message
Jamie



Joined: 12 Jan 2004
Posts: 5

Post Dynamic Job issue in 3.4.21 Reply with quote

I have a job that watches a directory for changes.
When it sees a file in the directory it opens the
file and creates a dynamic 24x7 jal job based on
the data in the file. It then starts that dynamic
job and goes back to waiting for changes in the
directory. The dynamic jobs are created as detached
jobs so that they will not interfere with the running
of the watch job or any other jobs in the job database.
Since upgrading o the 3.4.21 patch the watch job now
waits for the dynamic job to complete before it goes
back to watching the directory. This should not be
happening since the job it created is detached.
Here is a snippet of the code that creates the job:

jobcreate(job_num)

JobModify( job_num, "name", job_name )

JobModify( job_num, "script", script_line )

JobModify( job_num, "job_type", "S" )

jobmodify( job_num, "detached", "Y")

jobmodify( job_num, "schedule_type", "O")

jobmodify( job_num, "queue", "JobProcessor")

JobEnable( job_num, true )

jobrun( job_name )
The variable job_name is the name I want the job to
have, and the variable script_line is the text of
the jal script I want to run.
Any help would be good,
Jamie


Thu Sep 02, 2004 10:03 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7966

Post Re: Dynamic Job issue in 3.4.21 Reply with quote

Yes, that behavior was actually caused a bug in previous versions that caused detached jobs to run always asynchronous mode even when they must run in synchronous mode.
JobRun by design causes the job to run in synchronous mode before returning control to the caller job. If you want to spawn a separate job and don't want to wait for that job use a slightly different method.
Instead of JobRun( job_name )
use

Dim(command, string, "24x7.exe /JOB ")
Dim( pid, number )
Concat( command, job_name, command )
Run( command, "", pid )

In case if job name contains spaces enclose job name in double quotes or use job id in the Run command instead of a job name.
If job name is non-unique always use job id to refer to this job.

: I have a job that watches a directory for changes.
: When it sees a file in the directory it opens the
: file and creates a dynamic 24x7 jal job based on
: the data in the file. It then starts that dynamic
: job and goes back to waiting for changes in the
: directory. The dynamic jobs are created as detached
: jobs so that they will not interfere with the running
: of the watch job or any other jobs in the job database.
: Since upgrading o the 3.4.21 patch the watch job now
: waits for the dynamic job to complete before it goes
: back to watching the directory. This should not be
: happening since the job it created is detached.
: Here is a snippet of the code that creates the job: jobcreate(job_num)

: JobModify( job_num, "name", job_name )

: JobModify( job_num, "script", script_line )

: JobModify( job_num, "job_type", "S" )

: jobmodify( job_num, "detached", "Y")

: jobmodify( job_num, "schedule_type", "O")

: jobmodify( job_num, "queue", "JobProcessor")

: JobEnable( job_num, true )

: jobrun( job_name )
: The variable job_name is the name I want the job to
: have, and the variable script_line is the text of
: the jal script I want to run.
: Any help would be good,
: Jamie

Thu Sep 02, 2004 10:16 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.