Reputation: 270
I am creating a task scheduler that needs to be running even when the user is logged off. From what I've read, a windows service is best for this.
Obviously it also needs a GUI for the user to actually schedule tasks.
I don't think windows services can have a GUI, what is the best way to accomplish this?
Upvotes: 1
Views: 2884
Reputation: 364
You can create scheduled task using "Task Scheduler" utility in Windows. You can specify the frequency, executable etc details in the "Task Scheduler".
Upvotes: 0
Reputation: 137128
You need to write two programs.
The first is the UI for managing the data - adding & removing schedules etc.
The second is the Windows service that just reads the data and acts on it.
You'll need a database or configuration file that both programs can read and write to, so you'll need to have some form of data locking to prevent issues if both the service and GUI are trying to update the data at the same time.
The "database" doesn't have to be a full blown relational database like SQL or oracle. It would probably be enough to be a configuration file that the GUI writes and the service reads. The storage method you choose depends on the volume and complexity of the data you need to store.
Upvotes: 3