• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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