Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

Commented Unassigned: TaskEventWatcher will not watch a folder unless IncludeSubfolders is true [12379]

$
0
0
Hi, I wanted to report this because the behavior in 2.5.18 is different than the library version included with the [events example](https://taskscheduler.codeplex.com/wikipage?title=EventSamples&referringTitle=Documentation) (2.5.7) and it took me a while to realize what was missing :)

That said, thanks for an amazing library!
Comments: ** Comment from web user: corrego **

I am running win7 pro sp1 x64 (spanish). I am watching a folder, no filters. This is my init code:

```
watcher = new TaskEventWatcher();
watcher.BeginInit();
watcher.Folder = "\\Automation";
watcher.IncludeSubfolders = true; // if i don't include this line, i don't get any events

// Only watch for task events that are informational
watcher.Filter.EventLevels = new int[]
{(int)StandardEventLevel.LogAlways, (int) StandardEventLevel.Informational};

// Assign an event handler for when events are recorded
watcher.EventRecorded += Watcher_EventRecorded;

// Start watching the folder by enabling the watcher
watcher.Enabled = true;
watcher.EndInit();

```
Anything else I can do to help? Thank you


Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>