SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Timeout property

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Timeout property
Author Message
Mauricio



Joined: 31 Dec 2002
Posts: 6

Post Timeout property Reply with quote

I am trying to setup the timeout property for a job.
The script I wrote for the job was:

Dim res, string
JobModify( "@V"job_id"", "Timeout", "1" )
InputBox( "pause sync 2", "PROCESS 2", res )

When I run the job, There job doesn't finish (timeout) after 1 min.
How can I set that property for the job so it has a finite timeout?

Thanks,

-Mauricio

Wed Aug 17, 2005 11:12 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Timeout property Reply with quote

This script is not going to work because of the following reasons:
1. Job can change its own timeout, but it doesn't apply to the currently running instance, it only changes the job definition.
2. Timeout makes sense for program type jobs that run an external process and terminate it forcibly when the process runs longer then expected (as specified in the timeout). Here is what the docs say: "This property is used with synchronous program type jobs only."
3. InputBox is invalid, second parameter is not a free text. It must be one of the predefined edit styles.

Please let me know what you are trying to do and I will suggest how to do that right.

: I am trying to setup the timeout property for a job.
: The script I wrote for the job was: Dim res, string
: JobModify( "@V"job_id"", "Timeout",
: "1" )
: InputBox( "pause sync 2", "PROCESS 2", res )

: When I run the job, There job doesn't finish (timeout) after 1 min.
: How can I set that property for the job so it has a finite timeout?

: Thanks,

: -Mauricio

Wed Aug 17, 2005 11:24 am View user's profile Send private message
Mauricio



Joined: 31 Dec 2002
Posts: 6

Post Re: Timeout property Reply with quote

I am trying to create a sample job to setup a timeout for different jobs. I read about the timeout property for the job, and tried looking at how to set it up, and see the results. The job is setup as a synchronous job. About the input box, I was just trying to create an instruction where visually I could see when the job gets terminated.

This is actually what I need to accomplish:

I have a job that runs in a Remote Instance. This job has been hanging every now and then, since the job is setup as synchronous, it hangs the queue where it gets loaded, delaying other jobs that gets posted to that queue. The job that hangs is pretty much a call to an external executable that creates some files, the files get emailed and posted to an FTP site. The excutable command works properly since the files are created, the emails get sent, but somewhere between sending the emails and posting the files to the FTP site, the job hangs. Seting up a timeout in the job, would resolve the hanging part and releasing the queue.

Any ideas?

: This script is not going to work because of the following reasons: 1. Job can
: change its own timeout, but it doesn't apply to the currently running
: instance, it only changes the job definition.
: 2. Timeout makes sense for program type jobs that run an external process and
: terminate it forcibly when the process runs longer then expected (as
: specified in the timeout). Here is what the docs say: "This property
: is used with synchronous program type jobs only."
: 3. InputBox is invalid, second parameter is not a free text. It must be one
: of the predefined edit styles.

: Please let me know what you are trying to do and I will suggest how to do
: that right.

Wed Aug 17, 2005 11:49 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Timeout property Reply with quote

You can do several things:
1. You can put the job into its own queue to make sure it does not affect other jobs
2. You can set it to run detached so it cannot affect the memory and resources allocated to the queue
3. You can use a two-job approach using "runner" and "worker" jobs. Please search messages for any of these words to find previous threads discussing and describing that method. In brief you set the schedule of the current job to [no schedule] and create another job copying the current schedule. The new job gets a command line like "24x7.exe /JOB [id of the current job here]" and has a proper timeout set. Conceptually this is the "runner" job. The "runner" job can kill the "worker" job if the last one hangs as specified in the timeout property.

: I am trying to create a sample job to setup a timeout for different jobs. I
: read about the timeout property for the job, and tried looking at how to
: set it up, and see the results. The job is setup as a synchronous job.
: About the input box, I was just trying to create an instruction where
: visually I could see when the job gets terminated.

: This is actually what I need to accomplish: I have a job that runs in a
: Remote Instance. This job has been hanging every now and then, since the
: job is setup as synchronous, it hangs the queue where it gets loaded,
: delaying other jobs that gets posted to that queue. The job that hangs is
: pretty much a call to an external executable that creates some files, the
: files get emailed and posted to an FTP site. The excutable command works
: properly since the files are created, the emails get sent, but somewhere
: between sending the emails and posting the files to the FTP site, the job
: hangs. Seting up a timeout in the job, would resolve the hanging part and
: releasing the queue.

: Any ideas?

Wed Aug 17, 2005 12:34 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.