Search This Blog

Thursday 14 May 2009

How Many Tasks does WatchDirectory support?

A question that sometimes comes up is
How Many Tasks does WatchDirectory Support?

If this is for making a purchase decision (Do I need WD Standard or Professional), the answer is:
WD Standard supports 3 tasks. WD Professional supports..... mmmmm, well it depends.

Number of Tasks

There is no artificial limit for the number of tasks that WatchDirectory Professional can run. There are, however, other limitations (mostly memory related) that limit the number of tasks.

walnut
  • Available Memory
    Each task you run requires some memory. The amount of memory needed depends on several things, most importantly on the Monitoring Method you use.
  • Size of Monitored Directories
    If you use the "Default" or "Polling" Monitoring Method, your task will have a representation of the monitored directory in memory. Large directories require more memory. The "File Age" and "Fast" monitoring methods do not require this representation.
    See also Monitor Huge Directories.
  • Run Mode
    If you run your tasks as a Windows Service, there are some Windows limitations for the number of Services supported. The actual limit depends on your Windows version and on the number of other services you have running. If you reach this limit, you will typically receive error messages like this:
    StartService fails: Error Code:1053
    Description: The service did not respond to the start or control request in a timely fashion.

    The last few posts in this forum topic describes a few work-arounds.
  • The Size of your Brain
    Can you really manage 200 (WatchDirectory) tasks?

Why so Many?

Often it can be easy to replace several tasks by just one, especially if their monitored directory "share" a common parent directory. A few tips....

Replace multiple "Copy Files" by one "Sort Files" task

If you want to copy files to multiple destinations, you don't have to create multiple "copy files" tasks. Instead create just one "Sort Files" task. Each "rule" you create can have another destination.
See also The Sort Files plugin.

Merge multiple "Email Notification" tasks into one

When the email address is the only thing that's different for each task, you may want to look at the "Advanced Addressing" options for the email plugin. This allows you to specify different email addresses depending on the sub-directory where the file is found. An old newsletter also describes this.

Update (WatchDirectory 4.6.2): When you use Advanced Addressing, using the "email.txt" trick, you can also set the Subject and message body depending on the directory where the file is found.

See also The Email Plugin and Advanced Addressing.

Convert tasks into Subtasks

WatchDirectory v4.5.8 introduced a new plugin that can run other tasks as Subtasks. There are a few limitations described further in the help file.
See also The Run Subtasks Plugin.

No comments: