Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27513

VS 2012 Scheduling Tasks

$
0
0
Hello. I have a small class library, each implementing the ITask interface:
Code:

Public Interface ITask
    Property StartTime As DateTime
    Property StopTime As DateTime
    Property RunFrequency As TimeSpan
    Sub Start()
    Function Execute() As Integer
    Sub Finish()
End Interface

I'm looking to allow my user to schedule these tasks. Basically a big list of tasks.. each one on it's own thread.
psuedo: If Now >= startTime and Now <= stopTime, Threading.Thread.Sleep(task.execute())

What controls could I use to make the scheduling look neat? How would I go about with the actual threading part? Would I need to add a Thread property to my ITask interface?

Viewing all articles
Browse latest Browse all 27513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>