Windows Security Auditing: Scheduled Task Run Program Ended (Event ID 4689)

Abstract: Resolve unexpected scheduled task failures by enabling process termination auditing to capture Event ID 4689 and analyze exit codes for root cause identification.

Created: 2026-10-12 by
Event ID 4689 in the Windows Security event log indicates that a process has ended. This audit success event is critical for tracking system stability and security compliance. It logs the termination of scheduled tasks, services, or user applications, providing essential data such as the process identifier, parent process, and exit code.

Understanding Event ID 4689

Windows Security Auditing relies on detailed logging to monitor system behavior. When you enable auditing for process termination, the operating system generates Event ID 4689 every time a process stops running. This is not an error by default; it is an informational record of lifecycle completion. For administrators managing large networks, these events provide visibility into which programs are executing and how they conclude their operations.

The significance of this event extends beyond simple tracking. It helps identify unexpected crashes, unauthorized script executions, or scheduled maintenance jobs that may be consuming excessive resources. By analyzing the exit codes associated with Event ID 4689, you can distinguish between clean exits (code 0) and failures (non-zero codes), allowing for proactive troubleshooting before minor issues escalate into major outages.

Enabling Process Termination Auditing

To start receiving Event ID 4689 entries, you must configure Advanced Audit Policy Configuration. This setting is not enabled by default because generating these logs can significantly increase the volume of data written to the security log, potentially impacting performance if left unchecked. Follow these steps to enable the policy:

  1. Open the Group Policy Management Console (gpmc.msc) or edit the local group policy using gpedit.msc.
  2. Navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Process Tracking.
  3. Locate the setting named Audit Process Termination.
  4. Set this policy to Success to log when processes end normally, or Failure to log only when they terminate unexpectedly due to errors.
  5. Click OK to save the changes and apply the policy to your system or domain.

After applying the policy, run gpupdate /force in an elevated command prompt to ensure immediate propagation. You can verify the setting by checking the Security log in Event Viewer after terminating a test process.

Analyzing the Event Details

Once auditing is active, Event ID 4689 appears in the Windows Security log under Applications and Services Logs > Microsoft > Windows > Security-Auditing. Each entry contains specific fields that help you diagnose the context of the termination. The most important field is the Exit Status, which displays the hexadecimal exit code returned by the application.

Additionally, the event includes the Subject section, which identifies the user account that initiated the process. This is crucial for accountability, especially in multi-user environments. The Process Information section lists the name of the executable file, its full path, and the Process ID (PID). Cross-referencing the PID with other events, such as process creation (Event ID 4688), allows you to trace the entire lifecycle of an application from start to finish.

If you are investigating a specific scheduled task failure, look for non-zero exit codes in Event ID 4689. Common codes include 0x1 (incorrect function call) or 0xC0000135 (DLL not found). These codes often point to missing dependencies or configuration errors rather than fundamental security breaches. However, if you see frequent terminations of critical system processes, it may indicate malware interference or resource exhaustion.

Managing Log Volume and Performance

Enabling process termination auditing can generate thousands of events per hour on busy servers. To prevent disk space exhaustion and maintain system performance, you should implement log rotation and filtering strategies. Configure the Security log size limits in Event Viewer to overwrite old events automatically once the maximum size is reached. Additionally, use Event Viewer filters to focus on specific processes or users relevant to your investigation, rather than browsing through raw data.

For enterprise environments, consider forwarding these events to a centralized SIEM (Security Information and Event Management) solution. This approach offloads the processing burden from individual endpoints and allows for advanced correlation rules. You might also want to exclude high-volume, benign processes from auditing if they do not pose a security risk. Balancing visibility with performance is key to maintaining a healthy auditing infrastructure.

Regularly review your audit policies to ensure they remain aligned with current security requirements. As new applications are deployed, assess whether their termination events need to be monitored. Over-auditing can lead to alert fatigue, where genuine threats are missed among the noise of routine process completions. Periodic audits of your logging configuration help maintain efficiency.

Related Security Considerations

While Event ID 4689 provides valuable insights into process lifecycles, it is part of a broader security ecosystem. Understanding privilege escalation vectors is equally important, as attackers often rely on legitimate scheduled tasks to execute malicious code. If you suspect unauthorized activity, correlate Event ID 4689 with privilege escalation events to detect anomalies in user behavior. Furthermore, ensuring that remote registry access is properly audited can help track changes to scheduled task configurations themselves, adding another layer of defense against tampering.

Application trustworthiness is another factor. If a scheduled task terminates unexpectedly, verify the integrity of the executable file. Malware may attempt to masquerade as legitimate system processes, causing them to crash or behave erratically. Integrating application control policies with audit logging creates a robust framework for detecting and responding to suspicious activities. Always combine process termination data with other security telemetry for a comprehensive view of system health.

Frequently Asked Questions

Does Event ID 4689 indicate a security breach?

No, Event ID 4689 is a standard audit event that logs normal process termination. It becomes significant only when correlated with unusual patterns, such as frequent crashes of critical services or execution by unauthorized accounts. Use it as a diagnostic tool rather than an immediate alarm indicator.

How can I filter Event ID 4689 for a specific program?

You can create a custom view in Event Viewer by selecting Create Custom View, choosing Security as the log, and adding a filter for Event ID 4689. Then, add a second filter for the Image field containing the name of the executable you wish to monitor.

Will enabling this audit affect system performance?

Yes, enabling process termination auditing increases I/O load on the disk where the security log is stored. On high-transaction systems, this can lead to noticeable latency if the log grows too quickly. Mitigate this by increasing log size limits or forwarding events to a remote server.

What does a zero exit status mean in Event ID 4689?

A zero exit status typically indicates that the process terminated successfully without errors. Many applications return zero upon graceful shutdown. Non-zero values usually signify specific error conditions defined by the application developer.

Can I disable auditing for specific trusted processes?

Windows Group Policy does not allow granular exclusion of specific processes from auditing at the policy level. You must either disable auditing entirely or manage log volume through filtering and log size limits. Some third-party endpoint protection tools offer more granular control over audit events.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More