Hi, I've created a setup file in winforms application. After installing that setup file i want to run that file at a specific time in a day only.
Ex : every day 12 PM that program automatically popups
how can i do it? any idea?
Hi, I've created a setup file in winforms application. After installing that setup file i want to run that file at a specific time in a day only.
Ex : every day 12 PM that program automatically popups
how can i do it? any idea?
Add an entry to the Windows task scheduler would be the easiest way.
I've never done this, but it should be possible to do during setup. (Even if that would mean executing some additional code during setup.) Problem is the difference in task schedulers before and after Vista. There is a Task Scheduler API and Vista and better also have a special commandline application to create new jobs.
You can call "C:\WINDOWS\system32\at.exe" to schedule programs to run. Watch out for the program overlapping the next run as well.
Please don't do this:-
"Add a timer to windows service that will check every 3 minutes for example if it is the time to execute" If you must that use an interval timer, at least do the maths and calculate the interval so windows can swap the damn thing out.
Dunno about you but I've got a million little tray apps that wake up every 30 seconds just to check if they're supposed to be running as it is. No more of them thanks.