How to do a Vb.net routine, function that runs at a set time?

Asked

Viewed 263 times

-1

Hello need help with Vb.net in an Asp.net application, I need to create a function that runs after 24 hours for closing operations, but I have no idea how to create a function that starts alone in a period of time.

  • 1

    has several forms, but the task scheduler of the windows is a simple way to do this

  • In fact they have a schedulle program for various functions no one else had passed me anything of how it would be was totally lost. So I just create the library and call her by an Aplication console, they startam my console on schedulle.

1 answer

-1


There are several ways to solve this problem, but I suggest a very simple and easy to implement.

Create an application like Console Application in your project. It is advisable that the entire executable be just the invocator of its logic that should reside in a namespace of its own. This App Console will generate an Executable that can be manually triggered.

On the Server where it is installed, create a scheduled task in the Scheduled Task Manager (Task Scheduler) (Win+R -> taskschd.Msc), and configure to run on desired days and times, pointing to your executable.

Use Log files to describe important sequences of operations, and especially to identify possible problems in your routine.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.