Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Emergency: Need an assistance on this scenario

by darunk90 (Initiate)
on Feb 14, 2020 at 13:25 UTC ( #11112965=perlquestion: print w/replies, xml ) Need Help??

darunk90 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Friends, I am new to perl program. Actually, I have an use case like, every hour we are running a script in Unix server to get some information from the server. So, every time we are sending a mail about that information. But, once the particular process has been completed, I don't want to send a mail for the day. This process will run on daily basis and every hour of the day. I am not sure, how can I do that. Anyone can guide me on this? Thanks, Arun Kumar Durairaj.
  • Comment on Emergency: Need an assistance on this scenario

Replies are listed 'Best First'.
Re: Need an assistance on this scenario
by haukex (Chancellor) on Feb 14, 2020 at 15:09 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Emergency: Need an assistance on this scenario
by marto (Archbishop) on Feb 14, 2020 at 13:38 UTC
      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.

        Run one script starting at 9am which polls occasionally and, when all conditions are met, reports and exits.

        A reply falls below the community's threshold of quality. You may see it by logging in.
        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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11112965]
Approved by LanX
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-06-05 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (37 votes). Check out past polls.

    Notices?