Schedule any (command-line) application from within EventSentry for custom system monitoring and task automation. Support batch files, executables and any script language (e.g. PowerShell, Perl, Visual Basic Script, ...) for which an interpreter is installed.
In addition to scheduling applications & scripts at set date and times, also supports continuously schedules every X minutes. The agent logs the output of the application to the event log with a dynamic severity (information or error) which supports error handling and automated remediation utilizing event log filters. See Event Logs for all possible event log records logged by this feature.
Executables launched with this feature will run under the same security account that the EventSentry agent is running under, the LocalSystem account by default. Take this into consideration when intending to run applications that require access to resources located on the network.
The application scheduler can either launch existing scripts that are present on the host, or launch an embedded script.
Process and/or scripts launched by the application scheduler feature which display message boxes, license dialogs and similar will not work as they will indefinitely block. For example, this affects some of the Sysinternals utilities which tend to display a license dialog the first time they are run.
Scheduling an application to run at set date/time
To schedule an application to run at a preset date and time, for example every day at 3pm, click the plus button next to the schedule list. You will be presented with the following dialog:
Set the Schedule Type to "Regular Schedule", and in the Date & Time area schedule the application to either run on certain weekdays, on certain days of the month or both.
The Process Timeout feature allows you to terminate a process if it runs longer than a certain amount of minutes. Set this option to 0 (minutes) to let processes run until they terminate on their own.
Specify the file to be executed in the Filename field. You can either specify or select an existing script with the "Browse" button, or select an embedded script with the drop-down menu. Embedded scripts are specified with the @ symbol in front of the file, as shown in the screenshot above.
When Terminate child processes is checked, then all child processes that have been launched by Filename will be terminated recursively.
Scheduling an application to run periodically
To schedule an application to run continuously, for example every 5 minutes, click the plus button next to the schedule list. You will be presented with the following dialog:
Set the Schedule Type to "Recurring Schedule" and configure it accordingly. The schedule can be restricted further by only having the application run during certain time periods, for example between 8AM and 5PM.
Changing an Existing Schedule
You can change existing schedules by double-clicking on the entries in the schedule list.
When launching a script (e.g. VBScript), then it is recommended that point the Filename field to the scripting engine (e.g. cscript.exe) with the script file as the argument. For example
to execute the file c:\batch\files_count.vbs.
Application Return Codes
To take advantage of the return code analysis, it is recommend to either call executable applications directly (e.g. ping.exe) or to invoke scripts using a scripting engine that let you specify the return code (e.g. VBScript using cscript.exe). It is not recommended that you use batch files if the application return code is of significance.
•Checking the "Log application return code 0 to event log", will log an information event to the application event log, showing the text output of the script.
•Checking the "Log application return code > 0 to event log", will log an error to the application event log, showing the text output of the script.
The next chapter, "Example Scripts", lists Visual Basic scripts that would work well with the Application Scheduler feature.