ok Sure. Actually, we are using Control M jobs to run this script on every hour. By using this script, we are trying to get the time information of the jobs in a day. For example,
Job 1 runs on 9 am est,
Job 2 runs on 10 am est,
job 3 runs on 10.15 am est.
I have written the script to get the timing of those Control M jobs. this script is running on every hour to get the information. If I am running this script at morning 9 am est, it will send the time for job 1. the rest of the jobs not yet completed. again, I am running the same perl script on 10 am est, at that time job 2 completed and send the both job 1 and 2 information. again, I am running the script at 11 am est, it will return the information for Job 1, 2 and 3 as well. So, all jobs are completed and I received the enough information from my perl script. But, here the perl script will run on 12 pm est also. at that time, it will send those 3 jobs information again(Job 1, job 2 and job 3). I don't need the information from 12 pm est. Here, I can't schedule the job till 11 am only. why because, these jobs(job 1, 2 and 3) may extend more than 12 pm est also. We are not sure about when it will be complete. Once the consolidated information from those three jobs(job 1, 2 and 3), I should trigger a mail at till first time of all information. 2nd time onwards I don't need any information for the day. Please advise me on this. | [reply] |
| [reply] |
You can do things like watch for the running program to exit, have it touch a file on exit, or wait for the output file to stop being written. Then stat the file. The script that watches can send you the mtime so you know exactly when the output file was last written. If you don't care when you get the notification, you can stat the file any time.
| [reply] |
| [reply] |