Pankaj Pareek
Pankaj Pareek

Reputation: 589

Create schedule task for windows in vb.net

could any one tell me how to create schedule task for windows in vb.net,and how to attach a dll with schedule task.and can we make differnet dll for different function.Could you give me a link or code.

Actully i ahve one windows application which is performing 5 task at a time which are controlled by tick event on a timer .

But now i want to create schedule task for every task.so could you tell me how can i do that.Please give some breif details.

Thanks Pankaj Pareek.

Upvotes: 2

Views: 3982

Answers (2)

mathias.horn
mathias.horn

Reputation: 251

Take a look on this snippet:

https://www.aspsnippets.com/Articles/Simple-Windows-Service-that-runs-periodically-and-once-a-day-at-specific-time-using-C-and-VBNet.aspx

I hope it can helps. You can define the interval mode (days, minutes).

Upvotes: 0

Jay
Jay

Reputation: 57959

This MSDN article describes the steps required for creating a Windows Service: http://msdn.microsoft.com/en-us/library/9k985bc9(VS.80).aspx

The gist of scheduling with a service is to start a timer when the service starts and fire off the actual work of the service when the timer's Tick event is raised.

You can create a separate service for each function, or create a series of timers within one service, each of which does a different task when the appropriate amount of time has elapsed.

If you truly need each of these functions to be in a separate module, you can use MEF or I've done this with the System.Addin pipeline builder, but this is probably more trouble than it is worth -- too much of a learning curve for a simple problem domain.

Upvotes: 1

Related Questions