Dear James Morgan,
Based on your description and similar cases reported by other users, the issue appears to be related to Task Scheduler inconsistently launching cmd.exe
, even though logs indicate the task has run. Since manual execution works reliably, this rules out file path and permission issues.
To help monitor and capture failures when cmd.exe
does not launch or the batch file fails silently, we suggest the following:
- Enable Task History In Task Scheduler, click Enable All Tasks History (under the right-hand Actions pane). This will provide more granular logs under Event Viewer > Applications and Services Logs > Microsoft > Windows > TaskScheduler > Operational.
- Add Logging to Batch Files Modify each batch file to log its start and end time This helps confirm whether the batch file was actually launched.
- Use Task Scheduler Return Codes Review the Last Run Result column for error codes. A result of
0x0
means success, but other codes may indicate silent failures. - Create a Wrapper Script Instead of launching the batch file directly, use a PowerShell wrapper to log execution and errors:
- Check for Resource Contention Random failures may be due to system resource spikes. Use Performance Monitor to track CPU and disk I/O during scheduled task windows.
I hope this helps
Best regards,
Harry Phan