WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> How to... >> Have task go into standby
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1373909406

Message started by Balsawood on Jul 15th, 2013 at 7:30pm

Title: Have task go into standby
Post by Balsawood on Jul 15th, 2013 at 7:30pm
Hi all,

I was wondering if anyone had any ideas or if this idea is possible with wathdirectory.

I would like to have a task that monitors a folder and if it is quiet for X amount of time then send an email to someone (I have already set up this portion).

What I wanted to add to the task was that when it sees a certain file/folder name the task would go in standby; when another certain file/folder name appears the monitoring for the directory being quiet again kicks in and the process repeats.

Any ideas?

Thanks

Title: Re: Have task go into standby
Post by Gert on Jul 16th, 2013 at 10:29am
For that you need a 2nd task, looking for the triggering folder. The task can start a bat file to stop/start the other task.
See this blog for a few tips on stopping/starting tasks from a bat file: http://blog-en.gdpsoftware.com/2008/09/automatically-start-watchdirectory.html

Title: Re: Have task go into standby
Post by Balsawood on Jul 17th, 2013 at 3:36pm
Thanks!  I seem to be running into an issue though.  I can create a batch file to start the task, but when I create a trigger to look for a file name that contains H20 it won't trigger it.  I took off the H20 trigger for the batch file and replaced it with frt and tried a file that contained that and it worked... Any ideas?

Title: Re: Have task go into standby
Post by Gert on Jul 18th, 2013 at 9:38am
Hi,

There have been a few requests in the past for this kind of functionality... let the task sleep when some file appears and wake up the task when another appears. I will implement something for this in the next beta - likely available next week.

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.