SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
read job properties

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
read job properties
Author Message
Martyn



Joined: 26 May 2004
Posts: 27

Post read job properties Reply with quote

Is there a way to read the job properties of a job?
I would like to read the dates and times that a job
is to run programmatically.

The idea is to read the run times of each job and compare
them to SQL server to see if they have run today?

Tue Jun 14, 2005 9:10 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: read job properties Reply with quote

I am not sure if you mean really the job properties. You can use JobDescribe command or one of the 24x7 APIs to get the schedule properties, but this will not give you a list of past runs or forecast of future runs. You can also read schedule.log file and from that file extract historical stats (job number, name, run date, status, etc...). This is just a tab-separated text file that can be easily parsed or periodically loaded into a database table using DatabaseImport command. Once you get it imported you can run a query comparing the log data against your data.

Here is a simply 6-lines JAL job demonstrating how to load the log file

Dim rows, number
DatabaseConnect "profile name goes here"
DatabaseExecute "TRUNCATE TABLE my_table", rows
FileCopyEx "@V"24x7_home"\\schedule.log", "c:\\temp\\temp.txt", rows
DatabaseImport "my_table", "c:\\temp\\temp.txt", rows
DatabaseDisconnect

Further to this, you can even automate the comparison and reporting steps

DatabaseRetrieve "SELECT my compare statement goes here", rows
DatabaseSave "c:\\temp\\report.xls", "XLS", rows
MailSendWithAttachment "my", "password", "me", "subject", "message, "c:\\temp\\report.xls"

: Is there a way to read the job properties of a job?
: I would like to read the dates and times that a job
: is to run programmatically.

: The idea is to read the run times of each job and compare
: them to SQL server to see if they have run today?

Tue Jun 14, 2005 10:18 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.