Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

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 ?










0
gauravflame
Asked:
gauravflame
  • 2
  • 2
1 Solution
 
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:
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
 
Suhas .QA ManagerCommented:
for sending the mail you can use MIME::Lite module
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now