Monitor for file greater than 1 hour old
I need to be able to determine if a file is older than one hour and if so, email, text, or page to notify that our process 开发者_运维知识库has started. I need any file that ends with .eob
You can use DateTime date = File.GetCreationTime(str_Path); str_path is the path of the .eob file.
Then compare date variable with DateTime.Now()
and if its greater than 1 hour send your email or whatever you want to do next
EDIT
To accomplish this you will have to make a small c#/vb .Net application that will, when compiled, make a .exe. Then you can schedukle a job in windows to execute your small app.
精彩评论