Watchdog is your never sleeping dog that automatically informs you when something important happens. It can also execute your individually programmed actions.
![](images/Watchdog.en.jpg)
Watchdog is extremely versatile, here some examples:
Note that 'Arguments' must transfer the triggering pathname to 'ProcessPathName' because the action 'Open a file system item' expects this, and not 'PathName'.
Trigger Types
Watchdog supports a lot of trigger types and the list will grow in the future. If a trigger is fulfilled one says "it fires", which means it executes the Mighty Action that you have entered right of it. At the moment you have available:
Stamp Modified, Stamp Newer, Stamp Older: Checks the "Last Write" stamp of a file or folder. Only a single item can be specified.
-
Size Changed, Size Bigger, Size Smaller, Size As Specified: Checks the sum of all file lengths of the files that match the pattern.
-
File Count Changed, File Count Bigger, File Count Smaller, File Count As Specified: Counts how many files are returned when the 'FilePattern' is enumerated. For example if you specify "C:\MyFolder\*.doc" it will count how many documents are in the folder. You can also specify just an absolute pathname to a single file to kick start an action as soon as the file is there. It doesn't need to be a pattern. If some or all of the specified folders or files can't be found the count will just be 0. No warning or error will be displayed. This allows for using it for removable or network drives too.
-
Checksum Changed: Calculates a checksum (MD5, AES, SHA...) over all the files matching the pattern you specify and fires if at least one changes. You could use this to get informed as soon as something changes, for example a cryptocurrency wallet.
-
Trigger Value Found, Trigger Value Not Found: Some trigger types like 'File Count As Specified' require a value to be compared with. You can see the last evaluated/calculated value and the point in time on the right side.
-
Available Space Below: Calculates the free space on the drive of the pattern. This can warn you when space gets low. Be warned that Windows can sometimes react with data destruction when the space on a drive runs out during a write operation.
Recurrence
You can tell Watchdog, how often it should check the trigger:
- Manual: Only if you run it by pushing a button, executing a menu item or call it from commandline
- Background Checking Interval: Each time all the background checks are done, which is all 10 seconds by default
- Waiting To Resume: Periodically while waiting for the resume pattern to be fulfilled (see Suspend-Resume)
- Once After Resume: After the PC was resumed and the Resume function finished
- Specified Interval: You can enter your own time span. There are no limits for the length of a time span. Extended timespan notations used in DateTime Calculator are supported.
- At Workstation Locking: If you go into the Windows Desktop lock screen
- At Workstation Unlocking: If you unlock your Windows Desktop
- At Remote Connect: If another computer connects remotely to your PC
- At Remote Disconnect: If a remote connection has been disconnected
- At Remote ControlChange: If a remote PC takes over the desktop control, or if it terminates the control
- At Logoff: If you log the current Windows user off.
Executable Actions
Once a trigger fires you can specify one of the many actions from the Actions tab to be executed. In the special case that 'File or Folder Pattern' contains a path to an existing file and the file is smaller than 16 kB, Watchdog reads the content of the file and adds it as a new argument of name 'Content'. This allows to process the content in the executed action.
An example for a useful appliance of the 'At Remote Connect' trigger is to automatically close private programs, eg. a password safe.
A special paste operation is supported: You can paste a list of Watchdog entries from a textual XML structured definition. This is the same format that you will see when you drag or copy some entries into your text editor. If an entry is already existing a sequence number will be appended at the end of 'Name'. This allows to easily exchange Watchdog entries with your friends or import some from websites. In the future there is planned to have a page on our Website that lists some new cool Watchdog entries. Please send us your cool stuff by the feedback function in the About tab. We will then place it on that web page.
Basically you can execute any operation that is possible with your computer. The ultimate action can contain a 'Shell Script Command' which has the power to execute the same commands as a Windows Command Prompt.
Notes
- Watchdog has two lists, one that is edited and one that is processed in the background. By pressing 'Apply' the edited list is checked and sent to the background checker.
- If a copy is pasted via clipboard, a sequence number is appended to the name analogous to the File Explorer. This is a simple way to create a variant of an entry.
- For trigger 'Stamp Modified': If you execute an action on the same file that the trigger observes and you change something (eg. Replace Tabs by Blanks) you will have to do the operation without changing the file's last write time. Otherwise it could result in repeated firing of the trigger.
- If the folder of a pattern is not existing and the recurrence is a repeating interval (other than manual) the trigger will silently suppress triggering. This is a helping feature aimed at the case where the folder is located on an external drive which could be temporarily offline.
- You will have to double double-quotes inside an argument (DOS shell style)
- You can suppress execution of the action of a triggering watchdog item in the background by holding [Ctrl][Alt][Shift]. Note that the 'Last Seen Value' is still updated so you don't get annoyed later.
- If an error is displayed you can switch on 'Verbose' to view more details. This is done in a two layer hierarchy: First there is one global switch for the action. This can be overridden individually by the 'Verbose' field of each Mighty Command.
|