Solved

How to resume a hang console job due to lost network connection after the network connection is restored

Posted on 2009-04-13
1
287 Views
Last Modified: 2012-05-06
I wrote a console application that generates the reports in PDF format and exports the reports to a network share folder.  The job is written in VB.NET 2005 and scheduled to run every 2 hours.

Whenever the network connection was lost, the job will be hang until I acknowledge the error manually. Is there a way to resume the job automatically when the network connection is restored?  I used try catch clause in the code to catch the error and email the error to myself, but the email didn't send out neither due to the metwork problem.  

Thanks for help
0
Comment
Question by:jrmc-pgmr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 250 total points
ID: 24298968
You can use the try catch block to handle the error even if the email can not be sent. Just put the code in try catch blocks and within the catch block, make the thread sleep for a second and then try again.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MYSQL responding very slow 3 67
How can I add google maps in vb.net. 2 48
Help with Report Viewer in VS2013 6 33
Subtract dates in vb.net 6 35
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question