none
GPO Scheduled Task "Next Run Time" changes every time the GPO processes on the computer

    Question

  • I have a scheduled task (At least Windows 7) created via the Computer Configuration/Preferences/Control Panel Settings/Scheduled Task section in a GPO. 

    The trigger is set on a schedule.  It is set to Daily and to Recur every: 1 day with a Delay task for up to (random delay): 8 hours.

    Each time the GPO process on a computer the "Next Run Time" changes.  Every ~90 minutes This seems to push out the Next Run Time to the point at which it doesn't run for days at a time until a random time is selected that before the next time the GPO processes.

    I have tried setting the GPO action to Update and Create with the same results for both.

    The questions being:

    While the GPO Action is set to Create, If a scheduled task is already created why would it modify the "Next Run Time"?

    While the GPO Action is set to Update and no modification were made to the task or GPO, why would it modify the "Next Run Time"?

    Is there a way to stop this from happening?

    Thanks

    Thursday, April 30, 2015 7:51 PM

Answers

  • > While the GPO Action is set to Create, If a scheduled task is already
    > created why would it modify the "Next Run Time"?
     
    Does it really modify the next run time? In my repro, next run time
    changes each time you refresh in the task scheduler interface.
    Regardless of GP refresh...
     
    If you verify the task history, you will see that the task was not updated.
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Monday, May 4, 2015 9:17 AM

All replies

  • One thing I wanted to add... I have ~10000 computers and I don't want to set a static time where all ~10000 computers run this scheduled task at the same time.

    Thanks in advance for any help that can be provided.

    Thursday, April 30, 2015 7:59 PM
  • > While the GPO Action is set to Create, If a scheduled task is already
    > created why would it modify the "Next Run Time"?
     
    Does it really modify the next run time? In my repro, next run time
    changes each time you refresh in the task scheduler interface.
    Regardless of GP refresh...
     
    If you verify the task history, you will see that the task was not updated.
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Monday, May 4, 2015 9:17 AM
  • Thank you for your response.  I see what you are seeing as well.  I guess the bigger question is, why the scheduled task that is set to run daily with an offset of 8 hours doesn't run daily?  There are times it goes for 4 - 5 days without running.
    Tuesday, May 12, 2015 3:12 PM
  • > daily with an offset of 8 hours doesn't run daily?  There are times it
    > goes for 4 - 5 days without running.
     
    Are you actually deploying the task with action "create" or "update"? I
    believe if you "update" it will possibly change the schedule.
     

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Wednesday, May 13, 2015 7:06 AM
  • i have the same issue.

    i create a scheduled task with the setting "create" but every time the gpo are processed the settings of the task changed.

    In the History of the Task following info are listed:

    for example:

    I have a scheduled task for 3. Wednesday each month. The GPO Settings are below:

    GPO Settings:

    <?xml version="1.0" encoding="utf-8"?>
    <ScheduledTasks clsid="{CC63F200-7309-4ba0-B154-A71CD118DBCC}">
    	<TaskV2 clsid="{D8896631-B747-47a7-84A6-C155337F3BC8}" name="WindowsUpdate_3.Mi-im-Monat" image="0" changed="2016-10-24 07:24:32" uid="{566ACE64-6B60-4E3B-896A-585D26648DA2}" userContext="0" removePolicy="1" desc="Wenn Datei nicht vorhanden ist">
    	<Properties action="C" name="WindowsUpdate_3.Mi-im-Monat" runAs="SYSTEM" logonType="S4U">
    		<Task version="1.2">
    			<RegistrationInfo>
    				<Author>*****</Author>
    				<Description></Description>
    			</RegistrationInfo>
    			<Principals>
    				<Principal id="Author">
    					<UserId>SYSTEM</UserId>
    					<LogonType>S4U</LogonType>
    					<RunLevel>HighestAvailable</RunLevel>
    				</Principal>
    			</Principals>
    			<Settings>
    				<IdleSettings>
    					<Duration>PT5M</Duration>
    					<WaitTimeout>PT1H</WaitTimeout>
    					<StopOnIdleEnd>false</StopOnIdleEnd>
    					<RestartOnIdle>false</RestartOnIdle>
    				</IdleSettings>
    				<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    				<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    				<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    				<AllowHardTerminate>false</AllowHardTerminate>
    				<AllowStartOnDemand>false</AllowStartOnDemand>
    				<Enabled>true</Enabled>
    				<Hidden>false</Hidden>
    				<ExecutionTimeLimit>PT4H</ExecutionTimeLimit>
    				<Priority>7</Priority>
    			</Settings>
    			<Triggers>
    				<CalendarTrigger>
    					<StartBoundary>2016-07-01T03:00:00</StartBoundary>
    					<Enabled>true</Enabled>
    					<ScheduleByMonthDayOfWeek>
    						<Weeks>
    							<Week>3</Week>
    						</Weeks>
    						<DaysOfWeek>
    							<Wednesday></Wednesday>
    						</DaysOfWeek>
    						<Months>
    							<January></January>
    							<February></February>
    							<March></March>
    							<April></April>
    							<May></May>
    							<June></June>
    							<July></July>
    							<August></August>
    							<September></September>
    							<October></October>
    							<November></November>
    							<December></December>
    						</Months>
    					</ScheduleByMonthDayOfWeek>
    					<RandomDelay>PT30M</RandomDelay>
    					<ExecutionTimeLimit>PT4H</ExecutionTimeLimit>
    				</CalendarTrigger>
    			</Triggers>
    			<Actions Context="Author">
    				<Exec>
    					<Command>cmd.exe</Command>
    					<Arguments>/C cscript "c:\scripts\WUA_SearchDownloadInstall.vbs" &gt;&gt; c:\WSUS_AutoUpdate-Log\%date%.log</Arguments>
    				</Exec>
    			</Actions>
    		</Task>
    		</Properties>
    		<Filters>
    			<FilterFile bool="AND" not="1" path="C:\Windows\System32\Tasks\WindowsUpdate_3.Mi-im-Monat" type="EXISTS" folder="0"/>
    		</Filters>
    	</TaskV2>
    </ScheduledTasks>

    History Entries:

    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
      <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" /> 
      <EventID>141</EventID> 
      <Version>0</Version> 
      <Level>4</Level> 
      <Task>141</Task> 
      <Opcode>0</Opcode> 
      <Keywords>0x8000000000000000</Keywords> 
      <TimeCreated SystemTime="2017-01-18T02:04:37.482152200Z" /> 
      <EventRecordID>89336</EventRecordID> 
      <Correlation ActivityID="{7E73B5DA-397A-0000-8923-837E7A39D201}" /> 
      <Execution ProcessID="1876" ThreadID="11328" /> 
      <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel> 
      <Computer>***********</Computer> 
      <Security UserID="S-1-5-18" /> 
      </System>
    <EventData Name="TaskDeleted">
      <Data Name="TaskName">\WindowsUpdate_3.Mi-im-Monat</Data> 
      <Data Name="UserName">NT AUTHORITY\System</Data> 
      </EventData>
      </Event>
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
     <System>
      <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" /> 
      <EventID>106</EventID> 
      <Version>0</Version> 
      <Level>4</Level> 
      <Task>106</Task> 
      <Opcode>0</Opcode> 
      <Keywords>0x8000000000000000</Keywords> 
      <TimeCreated SystemTime="2017-01-18T02:04:37.801177700Z" /> 
      <EventRecordID>89337</EventRecordID> 
      <Correlation ActivityID="{7E73B5DA-397A-0000-8923-837E7A39D201}" /> 
      <Execution ProcessID="1876" ThreadID="11328" /> 
      <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel> 
      <Computer>*******</Computer> 
      <Security UserID="S-1-5-18" /> 
      </System>
     <EventData Name="TaskRegisteredEvent">
      <Data Name="TaskName">\WindowsUpdate_3.Mi-im-Monat</Data> 
      <Data Name="UserContext">SYSTEM</Data> 
      </EventData>
      </Event>

    And that every 60-90 Min.

    Please Help or i must create a ticket to ms primier support?




    • Edited by Ed Sta Wednesday, January 18, 2017 4:22 AM Computername delete
    Wednesday, January 18, 2017 4:21 AM