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

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.

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.

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way.
I've always enjoyed working with graphics, but it's never too clever to re-invent …

Creating an analog clock UserControl seems fairly straight forward. It is, after all, essentially just a circle with several lines in it! Two common approaches for rendering an analog clock typically involve either manually calculating points with…

Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen.
Visualize your data! ... really see it
To use the code to create a calendar from a q…

In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB.
How Percona can help
Percona can help you determine if Percona Server for MongoDB is the right solution for …