SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Job Modify

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Job Modify
Author Message
Eric Davis



Joined: 31 Jan 2005
Posts: 54

Post Job Modify Reply with quote

If I am reading the documentation correctly, if I have a job that is located on a master scheduler, but runs on remote host 'x' ... i am NOT able to modify the properties of this job at all?

I can ONLY modify jobs that exist and RUN on the local master schedule ?

Fri May 27, 2005 9:48 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Job Modify Reply with quote

You understood that correctly, but this is not a limitation that you are probably "seeing."

Here is a brief description of a master scheduler and remote job concept:
All jobs are created, MODIFYIED, monitored and audited in one place on the master. At the scheduled time or event the master scheduler makes a connection to specified remote agent (or another master) and deploys the job definition. The agent receives the job definition and runs it as a dynamic job. After the job is complete, there is nothing left of it on the remote agent and so there is nothing that can be modified.

Therefore, if you need to modify a job based on the results of a remote execution you need to bring these results back to the master and then run a piece of code (for example in the job on-finish notification action) that will modify a "local" job. This is surely doable. You can use files or GetRemoteVariable or other ways to push the data back to the scheduler. I just don't think this is the best approach. In %99 of cases it can be done much easier. Please let me know what you are trying to accomplish so I can suggest the best method.

: If I am reading the documentation correctly, if I have a job that is located
: on a master scheduler, but runs on remote host 'x' ... i am NOT able to
: modify the properties of this job at all?

: I can ONLY modify jobs that exist and RUN on the local master schedule ?

Fri May 27, 2005 10:08 am View user's profile Send private message
Eric Davis



Joined: 31 Jan 2005
Posts: 54

Post Re: Job Modify Reply with quote

What I am trying to do, and what works 100% on a local job... is to download a file, and verify the date / information inside this file.

If the file is 'old' ie, bad date or of on any other info... schedule the job start time to be current job start time + 10 min.
If the job runs sucessfully, it sets the job start time to be the original start time of the job

I do it this way over the established 'retry on error' functionality because of crashes / bugs with this process.

My problem is that I wish to do this on jobs that run on remote hosts...

question : why am i prevented from connecting BACK to the master scheduler in the job (with remotejobmodify) to modify it ?


Fri May 27, 2005 10:46 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Job Modify Reply with quote

So you are using a script job. You can then employ the following method to self-modify the job

1. In the job script code something like

Dim GLOBAL.JOB_XXX_STATUS, Number
Set GLOBAL.JOB_XXX_STATUS, 0
// .... the rest of the job script
// At the end of the script
Set GLOBAL.JOB_XXX_STATUS, 1

2. In the job notification action of JAL script enter the following

Dim job_status, number
GetRemoteVariable "agent name", "GLOBAL.JOB_XXX_STATUS", job_status

JOB_XXX_STATUS is just a variable name use something like JOB_855_STATUS or any other unique name if you need use this method for multiple jobs.

3. Based on the retuned value implement run your JobModify logic.

==========================
I would still recommend using the retry option and in the job script simply call RaiseError to fail the job. The rest will be automatically handled by 24x7.
To ensure the job runs smoothly set the job to run detached. This will protect the scheduler from job crashes.

PS. There is no such command available as RemoteModifyJob.

: What I am trying to do, and what works 100% on a local job... is to download
: a file, and verify the date / information inside this file.

: If the file is 'old' ie, bad date or of on any other info... schedule the job
: start time to be current job start time + 10 min.
: If the job runs sucessfully, it sets the job start time to be the original
: start time of the job

: I do it this way over the established 'retry on error' functionality because
: of crashes / bugs with this process.

: My problem is that I wish to do this on jobs that run on remote hosts...

: question : why am i prevented from connecting BACK to the master scheduler in
: the job (with remotejobmodify) to modify it ?

Fri May 27, 2005 11:16 am View user's profile Send private message
Eric Davis



Joined: 31 Jan 2005
Posts: 54

Post Re: Job Modify Reply with quote

Sorry.. I meant remotejobmodify

I use this method because the retry functionality in the latest release does not properly increment the run iteration. And crashes 24x7 in a small but signifigant percentage. I haven't had any greater luck running detached.

If i am reading your code correctly.. you are saying that the script run in the job finish notification action on a script set to run remotely WILL modify the job on the local master schedule ? Let me try this now

: So you are using a script job. You can then employ the following method to
: self-modify the job

: 1. In the job script code something like

: Dim GLOBAL.JOB_XXX_STATUS, Number
: Set GLOBAL.JOB_XXX_STATUS, 0
: // .... the rest of the job script
: // At the end of the script
: Set GLOBAL.JOB_XXX_STATUS, 1

: 2. In the job notification action of JAL script enter the following

: Dim job_status, number
: GetRemoteVariable "agent name", "GLOBAL.JOB_XXX_STATUS",
: job_status

: JOB_XXX_STATUS is just a variable name use something like JOB_855_STATUS or
: any other unique name if you need use this method for multiple jobs.

: 3. Based on the retuned value implement run your JobModify logic.

: ==========================
: I would still recommend using the retry option and in the job script simply
: call RaiseError to fail the job. The rest will be automatically handled by
: 24x7.
: To ensure the job runs smoothly set the job to run detached. This will
: protect the scheduler from job crashes.

: PS. There is no such command available as RemoteModifyJob.

Fri May 27, 2005 11:34 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.