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
Monitor Folder Size can't use file age method (Read 5446 times)
niallb
YaBB Newbies
*
Offline



Posts: 2
Monitor Folder Size can't use file age method
Jul 18th, 2013 at 2:36pm
 
Hi,

I have set up a task using the Monitor Folder Size plugin to send an email if there are more than 10 files in a folder and the oldest has been there over an hour, however this seems to be sending an alert immediately.

Setup:
When there are more than XXX files send an email alert every 80 minutes - XXX is set to 10
Monitoring Method:
Use the 'file age' monitoring method, Trigger for files older than 1 hours using latest of Creation/Modified, Poll every 10 minutes, remember triggered files.

I've put on debug mode and a snippet of the log seems to confirm that the plugin is ignoring the events:

11:17:23 walkdir...
11:17:23 DMFA - Walking directory \\server\monitoredfolder
11:17:23 \\server\monitoredfolder\file1.txt using date 18/07/2013 10:42:34 ** file is not old enough
...
11:17:23 \\server\monitoredfolder\file11.txt using date 18/07/2013 11:00:03 ** file is not old enough
11:17:23 DMFA - Waiting for timeout
11:17:28 checking....
11.17:28 Found 11 files inside the directory \\server\monitoredfolder\
11:17:28 triggered!
11:17:28 waiting....
11:27:23 DMFA - waitable timer said tick

This resulted in the following message:

There are more than 10 files in directory \\server\monitoredfolder\.
Found 11 files.

This messages was generated on computer ABC, timestamp 18/07/2013 11:17:28

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



Posts: 2225
The Netherlands
Re: Monitor Folder Size can't use file age method
Reply #1 - Jul 19th, 2013 at 7:58am
 
Hello Niall,

WD is implemented in 2 "parts":
the part that scans directories, looking for changes - the monitor
the part that acts on those changes - the plugins/tasks

All plugins/tasks get called by the monitor when a change is detected so they can do their job. The monitor tells the plugin the name of the detected file and the plugin (for example) copies or emails the file.

The Folder size plugin - http://www.watchdirectory.net/wdhelp/plugins/wdopFolderSize.html
works a bit different. When it is called by the monitoring part it ignores the detected file and does its own scan of the directory, for example to determine how many files are present.

I guess you need to use the email task ( http://www.watchdirectory.net/wdhelp/plugins/wdopAutoEmail.html ) together with the File Age monitoring method to check for "old files". Make sure to use the "combine emails" option to prevent receiving emails for each old file separately.
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
 
niallb
YaBB Newbies
*
Offline



Posts: 2
Re: Monitor Folder Size can't use file age method
Reply #2 - Jul 19th, 2013 at 2:14pm
 
Gert,

Thank you - that makes a lot of sense.

Niall
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1