Hi MotoX80.
Using the best example. When Windows Server Backup starts / fails / succeeds, it generates tan event 1 or 19 or 4 respectively. There is a separate Task Scheduler task attached to each of these events in the event log. When any of these appear in the event log it triggers a batch file that emails me and others the status of the backup as well as the the log from the backup tasks. The process also generates 3 other logs
- 1st records what has happened with the backup,
- 2nd records the processes within the batch file in case it has a problem performing any commands etc, (so that if an error happens I know where in the script it happened).
- 3rd is created by the emailer.exe creates a log recording the progress and status( in case the email fails etc)
If I right click the scheduled task for each event log item, and choose Run, it executes the batch file, and all 3 logs are updated
If I run the scheduled backup manually from Task Sched,
- the backup executes
- It writes its events to the event log
- The Scheduled tasks associated with the event IDs does not execute
The Event log entries are created by Windows Server Backup, none are created by any utils (in this instance, its not possible to create an event with eventcreate.exe in the Backup Event Log)
The script is identical across 35 odd servers (running either Server 2008R2 Server 2012/R2, 2016 and 2019) at different client sites without error
The above screen capture shows the last time these event viewer tasks executed which was when I last manually ran them. The last execution times should have been 4 hours ago (its Midday 29/12/21 where I am) for both Event ID 1 and Event ID 4 (backups all succeeded).