Catch Error Fall Under Sleep

Hi,

I am doing data transfer for 10 mts .

After I start the Data Transfer I put the sleep 10 mts .

1) If Data Transfer stop after 5 mts(due to some reason) so their is way in a Perl to Under this error.

2) Script will show the error  after the 5 mts.

Question : How to Handle Error while we invoke Sleep ?










gauravflameAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Suhas .Connect With a Mentor QA ManagerCommented:
Hi gauravflame,
you can use the benchmark for the total time taken for copying the script,
if its less than 600sec then send a mail with proper error message to concern person.

for more reference go through the module
http://search.cpan.org/dist/perl/lib/Benchmark.pm

Cheers!
Suhas
0
 
gauravflameAuthor Commented:
rehrase

1) ...their is a way in Perl to catch this error.

0
 
ozoCommented:
alarm
0
 
gauravflameAuthor Commented:
How I can use this alarm with

sleep 600;


Thanks
0
 
Suhas .QA ManagerCommented:
for sending the mail you can use MIME::Lite module
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.