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
Quiet Time (Read 3277 times)
PhilG
YaBB Newbies
*
Offline



Posts: 8
Quiet Time
May 1st, 2006 at 11:19pm
 
Is there a way to have the ap trigger on 30 min of inactivity following a new file event?  I am trying to process files in batches and want to be sure to get the entire batch.  When I had attempted to use the Quiet time, it triggered every 30 min, not just one time.

Thanks,

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



Posts: 2224
The Netherlands
Re: Quiet Time
Reply #1 - May 2nd, 2006 at 4:57pm
 
Hello Phil,

Sorry, but that is not possible. A workaround would be to use the .bat file plugin for new (not quiet) files and let it write a message (the filename for example) to an otherwise unused directory. The .bat file would be something like:

Code:
echo "%WD_FILE%" >> "C:\OtherDir\NewFiles.txt"
 



Now, create another task that monitors C:\OtherDir for new and changed files. Use the scheduler to delay the event 30 minutes and be sure to check the "merge tasks" and "when merging update the scheduled time" options. The effect will be that this task will start 30 minutes after the last event in the original directory.

Gert
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
 
PhilG
YaBB Newbies
*
Offline



Posts: 8
Re: Quiet Time
Reply #2 - May 4th, 2006 at 5:01pm
 
I understand what you are saying, but I need to have the action take place on the files in the original location.  If I have the second watch trigger the action, how do I let it know what directory to look for?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2224
The Netherlands
Re: Quiet Time
Reply #3 - May 5th, 2006 at 8:44am
 
What are you trying to accomplish?
Maybe you can do something like this trick (assuming you want to copy those files):
Instead of
Code:
echo "%WD_FILE%" >> "C:\OtherDir\NewFiles.txt"
 


use
Code:
echo COPY "%WD_FILE%"  \\Server\share\dir >> "C:\OtherDir\NewFiles.txt"
 


Setup the 2nd task the way I described earlier, and use the .bat file plugin to run "an existing .bat file". Write a new .bat file with this content:
Code:
move "C:\OtherDir\NewFiles.txt" "C:\OtherDir\NewFiles.bat"
Call "C:\OtherDir\NewFiles.bat"
del "C:\OtherDir\NewFiles.bat"
 



This should accumulate all copy commands for new files, and run them once every 30 minutes (depending on how you setup the scheduler).

Gert
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