WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Help - If a file is x minutes old then send Email (Read 1916 times)
vvisone
YaBB Newbies
*
Offline



Posts: 1
Help - If a file is x minutes old then send Email
Jan 9th, 2012 at 4:02pm
 
I’m evaluating watchDirectory hoping it can solve a problem we have. We have a text file that get updated every minute. The text file does not grow in size only the data in the file changes.  What I want to do is monitor this text file every minute or two to make sure it’s updated. If it does not then send an email. The only way to know if the file is updated is the timestamp of the file.  I have been able to get watchDirectory to do this to some degree but it send an email every time it see the change to the file I want it to send an email only if I does not see a change. Is this possible with watchDirectory?

Thanks
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2224
The Netherlands
Re: Help - If a file is x minutes old then send Em
Reply #1 - Jan 10th, 2012 at 9:22am
 
Hi,

Depending on how the txt file is changed (do the timestamps change?) the best way to do this is to use the "File Age" monitoring method and let it trigger for files "older than" x minutes.
Use the email task
Events: FILENEW (the only event supported by File Age)
Filter Events: set it up so only the file you want matches
Monitoring Method: File Age, poll directory every X minutes, trigger for files older than X minutes based on Creation/Modification date, do NOT have "remember triggered files" checked.


Alternatively:
http://blog-en.gdpsoftware.com/2010/02/receive-email-when-no-files-are-created.h...

That blog describes a slightly different scenario but tells some things to keep in mind (to prevent emails for FILENEW and FILECHNG). The way you should (I think) set it up is like this:

Use the email task
Events: FILENEW/FILECHNG and QUIET
Filter Events: set it up so only the file you want matches
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1