Page 1 of 1

sheduling

Posted: Sat Feb 11, 2006 9:50 pm
by vinodhraj
Hi,

I need a unix script to schedule 5 jobs at a particular time in sequence one after another and the status should be updating a table which consists of table name and status as attributes.

Even if one warning comes, the status should be updated as failed and the job report and job logs have to be e-mailed to the users.

Thanks

Vinod

Posted: Sat Feb 11, 2006 10:44 pm
by kcbland
Do you have a specific question, or are you asking if someone has developed something similar that you would like to obtain?

Posted: Sun Feb 12, 2006 5:37 am
by vinodhraj
hi Kenneth Bland,

I know these steps has to be followed..

1. dsjob -run <<project name >> <<job name>>
2. dsjob -report <<project name >> <<job name>>
3. dsjob -logdetail <<project name >> <<job name>>
4. (cat text.txt; uuencode /tmp/reports/prod_report.$date
prod_dailyreport.txt) |mailx -s "Daily -UNIX Report"

I don't know how to update the status in the status table.

Thanks

vinod

Posted: Sun Feb 12, 2006 8:53 am
by sanjay
Hi
its a oracle database write a oracle procedure to update status . and call procuedure in unix script.

Snjay
vinodhraj wrote:hi Kenneth Bland,

I know these steps has to be followed..

1. dsjob -run <<project name >> <<job name>>
2. dsjob -report <<project name >> <<job name>>
3. dsjob -logdetail <<project name >> <<job name>>
4. (cat text.txt; uuencode /tmp/reports/prod_report.$date
prod_dailyreport.txt) |mailx -s "Daily -UNIX Report"

I don't know how to update the status in the status table.

Thanks

vinod

Posted: Sun Feb 12, 2006 9:37 am
by kcbland
If you state the database of choice, then it will be as simple as using the command line interface to that database. For example, Oracle has sqlplus which can take a .sql script name as an argument on the command line. By generating a .sql script dynamically, you can invoke sqlplus to execute the .sql script. If you are adept at shell scripting, you could even pass the sql commands to the command line sqlplus using indirection within the script.

Posted: Sun Feb 12, 2006 9:50 am
by chulett
There's all kinds of ways to accomplish this. Ken and Sanjay have touched upon a couple of different approaches. Something else to think about...

If you are going to use the command line options to capture the results of your job runs, consider redirecting the output of those commands to flat files. More than likely, you won't need any special procedures or scripts to 'process' them but could leverage normal Server jobs to do that. It shouldn't be all that difficult to parse out the information you need from them, job name and status in particular, and then get that data inserted into your status table via one of the plug-in database stages.

You could also do a search here for mention of the famous ETLStats job collection from Kim Duke. It may be able to give you pretty much exactly what you need 'out of the box' or at least give you an enormous leg up with code and processes you can leverage. All freely available from his website.