without using the windows task scheduler is there a way to automatically run a task at a certain time using c#?

Recommended Answers

All 2 Replies

Yes, scheduling with your own program. but your program must always running.

You can do it, but it's not recommended. Usually people who want to do their own scheduling set up a Windows Service to do so. You can create one easily with Visual Studio in C#.

AFAIK .Net cannot interact with the Task Scheduler directly. There might be something in all those new Microsoft namespaces introduced in 3.0, but I know of one resource who's exposed the Task Manager to .Net for you already: http://www.mvps.org/emorcillo/en/code/shell/tasksched.shtml

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.