Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timed Event

Status
Not open for further replies.

Haunter

Programmer
Jan 2, 2001
379
US
Hello,

I have a need to kill a process at a certain time of day every day. I have got everything worked out for the new service except the event trigger.

Is there a simple way to set an event to fire everyday at a certain time? I have looked at System.timer but would like just to pass a variable of time and the event will fire every 24hours. I dont want the service to have any load on the server exept when it is time to kill the process.

Thanks in advance

haunter@battlestrata.com
 
I understand that you have a service (windows) to do this task e.g. kill a given task at a given time.
There are many solutions:

1)add a time scheduler and use it in the service
2)-use Task Scheduler to run at certain time a .bat file in which you only say
Code:
echo "" >file.ctl
[/ctl]
  - use SystemFileWatcher to watch for the creation of the file.ctl (few lines of code) and then kill the desired process and also delete the file.ctl;

obislavu
 
I was hoping for an eligant function call to .NET

haunter@battlestrata.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top