Set Time Out in Monitor Event

activities
i_parked

#1

Hello, I need to monitor an event (in my case, whether a new file is added or not) in a certain folder. But, I need to give it up after a certain time, and alert the user. I tried with Monitor Event and FIle Change Trigger, but can’t find any property to set the timeout / time limit. Any way to do this?


#2

Hello there,

I kind a like this idea of adding timeout to file change trigger activity in coming days(@ovi) . However there is a workaround for this.

This is how it goes,

  • Check number of file count
  • Use while for looping (kind of monitor event :slight_smile: )
  • match number of file count using if condition
  • exit the loop if it matches stopwatch timer(delayTime.Elapsed<TimeSpan.FromSeconds(30))

Here we go.
CheckNewFile.xaml (13.4 KB)

PS: Moved to Idea category


#3

That’s an honor! Thank you!

But so, it means there is no way to do that directly… Thank you for you clarification @ddpadil :slight_smile:


#4

Forgot to add that the workaround Do While file worked nice too. Using this!