Many Windows Server administrators encounter situations where scheduled tasks appear configured correctly but fail to trigger at their designated times. The specific case we're examining involves:
- A task set to run daily at 6:50 PM
- Configured to repeat every 10 minutes indefinitely
- Shows correct "Next Run Time" but doesn't actually execute
- Manual execution works fine
- Issue began after disabling/re-enabling the task
Through troubleshooting similar cases, I've found several potential causes:
# Check task status in PowerShell
Get-ScheduledTask -TaskName "YourTaskName" | Get-ScheduledTaskInfo
Sometimes the task cache gets corrupted. Try exporting, deleting, and reimporting:
# Export task
Export-ScheduledTask -TaskName "YourTaskName" -TaskPath "\" -XmlFile "task.xml"
# Delete task
Unregister-ScheduledTask -TaskName "YourTaskName" -Confirm:$false
# Reimport task
Register-ScheduledTask -Xml (Get-Content "task.xml" | Out-String) -TaskName "YourTaskName"
The Windows 2008 Task Scheduler has some quirks with repeating triggers. Try this alternative configuration:
$trigger = New-ScheduledTaskTrigger -Daily -At "6:50PM"
$trigger.RepetitionInterval = "PT10M"
$trigger.RepetitionDuration = "PT0S" # Infinite duration
Several factors can prevent task execution:
- User account permissions (try running as SYSTEM)
- Power settings preventing wake-from-sleep
- Task history limit reached
- Concurrency settings conflicting
For persistent issues, enable detailed logging:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Diagnostics]
"TaskStatusLogging"=dword:00000001
Then check Event Viewer under Applications and Services Logs > Microsoft > Windows > TaskScheduler.
For critical tasks, consider PowerShell's native scheduling:
$trigger = New-JobTrigger -Once -At "6:50PM" -RepeatIndefinitely -RepetitionInterval "00:10:00"
Register-ScheduledJob -Name "10MinJob" -ScriptBlock {
# Your code here
} -Trigger $trigger
When dealing with Windows Server 2008 SP2 Task Scheduler, I've encountered a scenario where a recurring task set to run every 10 minutes fails to trigger at the designated "Next Run Time." The scheduler UI updates the next execution time (e.g., from 8:00 PM to 8:10 PM) without actually executing the task, while manual execution works perfectly.
The problematic trigger shows this configuration in XML:
<Triggers> <CalendarTrigger> <StartBoundary>2012-06-18T18:50:00</StartBoundary> <Enabled>true</Enabled> <ScheduleByDay> <DaysInterval>1</DaysInterval> </ScheduleByDay> <Repetition> <Interval>PT10M</Interval> <Duration>P1D</Duration> </Repetition> </CalendarTrigger> </Triggers>
Before proceeding with solutions, verify these critical points:
- Task History: Check the "History" tab in Task Scheduler for error codes (even when Last Run Result shows 0x0)
- Account Permissions: Ensure the RUN AS account has "Log on as a batch job" rights (gpedit.msc → Computer Configuration → Windows Settings → Security Settings → Local Policies → User Rights Assignment)
- Power Settings: Confirm "Allow tasks to be run on demand" is enabled in Task Scheduler options
Here's a PowerShell script that completely recreates the task with reinforced settings:
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -File C:\scripts\your_script.ps1" $trigger = New-ScheduledTaskTrigger -Daily -At "6:50 PM" -RepetitionInterval (New-TimeSpan -Minutes 10) $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -DontStopOnIdleEnd Register-ScheduledTask -TaskName "Critical10MinTask" -Action $action -Trigger $trigger -Settings $settings -User "NT AUTHORITY\SYSTEM" -RunLevel Highest
For GUI users, follow these exact steps:
- Right-click the task → Disable
- Right-click → Export and save as backup
- Delete the original task
- Create new task with identical parameters
- Under Conditions tab:
- UNCHECK "Start the task only if the computer is on AC power"
- CHECK "Wake the computer to run this task"
- Under Settings tab:
- CHECK "Run task as soon as possible after a scheduled start is missed"
- Set "If the task fails, restart every:" to 1 minute
Use this PowerShell snippet to monitor task execution:
$taskName = "YourTaskName" $startTime = (Get-Date).AddMinutes(-15) Get-WinEvent -LogName "Microsoft-Windows-TaskScheduler/Operational" | Where-Object { $_.TimeCreated -ge $startTime -and $_.Message -like "*$taskName*" } | Select-Object TimeCreated, Message | Format-Table -AutoSize