on 10-20-2014 11:24 AM
Hi,
I am looking for a solution for my client which has below requirements.
1. An email should be sent at successful completion of job. -- I am aware of this config
2. The email should contain the start time and end time OR job run time in the body of the email.
Please let me know if this is possible and if yes, kindly advise the detailed config and process.
Regards,
Kedar Pujari
Hi Kedar Pujari,
How about creating a in job parameter on the mail job (replace 'Step 1, Job 1' with '<name_of_step>, Job <x>' where x is the number of the job of which you want the stats):
=Query.getNumber('select Job.RunTime from Job where Job.JobId = ?', [Query.getRelativeJob('Step 1,job 1')], 'n')
Alternatively (start time and end time):
=Query.getDate('select Job.RunStart from Job where Job.JobId = ?', [Query.getRelativeJob('Step 1,job 1')], 'n')
=Query.getDate('select Job.RunEnd from Job where Job.JobId = ?', [Query.getRelativeJob('Step 1,job 1')], 'n')
Then you reference that as ${Runtime}, ${RunStart}, ${RunEnd} in your mail source, respectively ... I assume you will name the parameters as such ... 😉
Regards,
HP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How are you sending an email now?
If you are using a HTML formal mail definition, add two 'in' parameters - Job Start and Job End.
In the job definition for which you want to report the start time and end time,
Put these in a job chain and map the our parameters of the job definition to the corresponding in parameters of Mail job definition.
Thanks
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.