Missed Windows Task runs when the computer starts





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







3















I have a problem oposite to the usual one.



I have a task to hibernate my computer at 8pm
If I hibernate the computer earlier, and turn it on next morning, the task runs and hibernates the computer (what I dont wont to happen)



I HAVE NOT selectede the "Run task as soon as posible after a schedule start is missed"



Am I wrong? doesn't this means that if the task is messed, it´s not going to run ?



Alex










share|improve this question













migrated from serverfault.com Aug 1 '10 at 22:53


This question came from our site for system and network administrators.

























    3















    I have a problem oposite to the usual one.



    I have a task to hibernate my computer at 8pm
    If I hibernate the computer earlier, and turn it on next morning, the task runs and hibernates the computer (what I dont wont to happen)



    I HAVE NOT selectede the "Run task as soon as posible after a schedule start is missed"



    Am I wrong? doesn't this means that if the task is messed, it´s not going to run ?



    Alex










    share|improve this question













    migrated from serverfault.com Aug 1 '10 at 22:53


    This question came from our site for system and network administrators.





















      3












      3








      3


      1






      I have a problem oposite to the usual one.



      I have a task to hibernate my computer at 8pm
      If I hibernate the computer earlier, and turn it on next morning, the task runs and hibernates the computer (what I dont wont to happen)



      I HAVE NOT selectede the "Run task as soon as posible after a schedule start is missed"



      Am I wrong? doesn't this means that if the task is messed, it´s not going to run ?



      Alex










      share|improve this question














      I have a problem oposite to the usual one.



      I have a task to hibernate my computer at 8pm
      If I hibernate the computer earlier, and turn it on next morning, the task runs and hibernates the computer (what I dont wont to happen)



      I HAVE NOT selectede the "Run task as soon as posible after a schedule start is missed"



      Am I wrong? doesn't this means that if the task is messed, it´s not going to run ?



      Alex







      windows-7 task-scheduler






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 1 '10 at 22:04









      Alex AngelicoAlex Angelico

      577512




      577512




      migrated from serverfault.com Aug 1 '10 at 22:53


      This question came from our site for system and network administrators.









      migrated from serverfault.com Aug 1 '10 at 22:53


      This question came from our site for system and network administrators.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          If you hibernate the computer before the time that the task is scheduled to start then the current clock state is saved as well (for synchronisation purposes).



          Once you resume from hibernation, the OS clock is brought back into sync with the hardware clock (which now shows a time and date that is after the scheduled task). I can only think that perhaps this triggers scheduled tasks to run because the time doesn't skip straight from A to B but rather 'plays forward' the interval in-between.






          share|improve this answer
























          • If this is the problem it might be as simple as setting the task to only run after X minutes of the machine being idle? Just a guess, the task scheduler for me in all versions of Windows never plays nicely.

            – Richard Lucas
            Aug 10 '10 at 12:02











          • Yes, that could be a solution, but what I really want is the PC to start at 8:45 (this works via the BIOS) and shutdown at 8:00 pm, because sometimes I don't even go to the office but I access the PC remotely. About the hardware clock sync, even so, it should work... probably is a Task scheduler misbehavior. I deleted the task and create a new one, but happens exactly the same.

            – Alex Angelico
            Aug 12 '10 at 20:24



















          0














          I was having the similar problem. (My task was set to run at 5:30 PM and then wait for 15 minutes of inactivity before suspending.)  In my case, it would work fine so long as the computer was running at 5:30 PM every day. If it ever missed the task due to being suspended, it would run the task on resume (and yes, I had also unchecked "Run task as soon as possible after a scheduled start is missed"). It would then suspend the computer after being resumed and having 15 minutes of inactivity.



          So, here's my solution:




          1. Edit your task's trigger. Check "Delay task for up to:" and select "1 minute"


          2. Create a batch file named "kill.bat"




            @echo off
            timeout 10
            schtasks /end /tn TaskName           # (Replace TaskName with the name of your task.)


            You may have to tinker with the timeout number. What you're looking for is for some amount of time (in seconds) that falls between a) the time required for the OS's clock to synchronise after resume, and b) the amount of time you delayed your task to run. Setting this number can get squirrelly given that the delay time is a maximum amount and not a specific amount. Try to set this timeout as close as possible to the time needed for the OS's clock to synchronize.




          3. Create a second task – this task will run the batch file you just created upon system resume.




            Trigger:
            Begin the task: "On an event"
            Log: System
            Source: Power-Troubleshooter
            Event ID: 1
            Action:
            Select the batch file you created in step 2.


            When configured properly, this new task should run on resume and kill the original task during the 1 minute delay you added to its configuration.








          share|improve this answer


























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f170671%2fmissed-windows-task-runs-when-the-computer-starts%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            If you hibernate the computer before the time that the task is scheduled to start then the current clock state is saved as well (for synchronisation purposes).



            Once you resume from hibernation, the OS clock is brought back into sync with the hardware clock (which now shows a time and date that is after the scheduled task). I can only think that perhaps this triggers scheduled tasks to run because the time doesn't skip straight from A to B but rather 'plays forward' the interval in-between.






            share|improve this answer
























            • If this is the problem it might be as simple as setting the task to only run after X minutes of the machine being idle? Just a guess, the task scheduler for me in all versions of Windows never plays nicely.

              – Richard Lucas
              Aug 10 '10 at 12:02











            • Yes, that could be a solution, but what I really want is the PC to start at 8:45 (this works via the BIOS) and shutdown at 8:00 pm, because sometimes I don't even go to the office but I access the PC remotely. About the hardware clock sync, even so, it should work... probably is a Task scheduler misbehavior. I deleted the task and create a new one, but happens exactly the same.

              – Alex Angelico
              Aug 12 '10 at 20:24
















            0














            If you hibernate the computer before the time that the task is scheduled to start then the current clock state is saved as well (for synchronisation purposes).



            Once you resume from hibernation, the OS clock is brought back into sync with the hardware clock (which now shows a time and date that is after the scheduled task). I can only think that perhaps this triggers scheduled tasks to run because the time doesn't skip straight from A to B but rather 'plays forward' the interval in-between.






            share|improve this answer
























            • If this is the problem it might be as simple as setting the task to only run after X minutes of the machine being idle? Just a guess, the task scheduler for me in all versions of Windows never plays nicely.

              – Richard Lucas
              Aug 10 '10 at 12:02











            • Yes, that could be a solution, but what I really want is the PC to start at 8:45 (this works via the BIOS) and shutdown at 8:00 pm, because sometimes I don't even go to the office but I access the PC remotely. About the hardware clock sync, even so, it should work... probably is a Task scheduler misbehavior. I deleted the task and create a new one, but happens exactly the same.

              – Alex Angelico
              Aug 12 '10 at 20:24














            0












            0








            0







            If you hibernate the computer before the time that the task is scheduled to start then the current clock state is saved as well (for synchronisation purposes).



            Once you resume from hibernation, the OS clock is brought back into sync with the hardware clock (which now shows a time and date that is after the scheduled task). I can only think that perhaps this triggers scheduled tasks to run because the time doesn't skip straight from A to B but rather 'plays forward' the interval in-between.






            share|improve this answer













            If you hibernate the computer before the time that the task is scheduled to start then the current clock state is saved as well (for synchronisation purposes).



            Once you resume from hibernation, the OS clock is brought back into sync with the hardware clock (which now shows a time and date that is after the scheduled task). I can only think that perhaps this triggers scheduled tasks to run because the time doesn't skip straight from A to B but rather 'plays forward' the interval in-between.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 10 '10 at 9:32









            Paul BeesleyPaul Beesley

            4531310




            4531310













            • If this is the problem it might be as simple as setting the task to only run after X minutes of the machine being idle? Just a guess, the task scheduler for me in all versions of Windows never plays nicely.

              – Richard Lucas
              Aug 10 '10 at 12:02











            • Yes, that could be a solution, but what I really want is the PC to start at 8:45 (this works via the BIOS) and shutdown at 8:00 pm, because sometimes I don't even go to the office but I access the PC remotely. About the hardware clock sync, even so, it should work... probably is a Task scheduler misbehavior. I deleted the task and create a new one, but happens exactly the same.

              – Alex Angelico
              Aug 12 '10 at 20:24



















            • If this is the problem it might be as simple as setting the task to only run after X minutes of the machine being idle? Just a guess, the task scheduler for me in all versions of Windows never plays nicely.

              – Richard Lucas
              Aug 10 '10 at 12:02











            • Yes, that could be a solution, but what I really want is the PC to start at 8:45 (this works via the BIOS) and shutdown at 8:00 pm, because sometimes I don't even go to the office but I access the PC remotely. About the hardware clock sync, even so, it should work... probably is a Task scheduler misbehavior. I deleted the task and create a new one, but happens exactly the same.

              – Alex Angelico
              Aug 12 '10 at 20:24

















            If this is the problem it might be as simple as setting the task to only run after X minutes of the machine being idle? Just a guess, the task scheduler for me in all versions of Windows never plays nicely.

            – Richard Lucas
            Aug 10 '10 at 12:02





            If this is the problem it might be as simple as setting the task to only run after X minutes of the machine being idle? Just a guess, the task scheduler for me in all versions of Windows never plays nicely.

            – Richard Lucas
            Aug 10 '10 at 12:02













            Yes, that could be a solution, but what I really want is the PC to start at 8:45 (this works via the BIOS) and shutdown at 8:00 pm, because sometimes I don't even go to the office but I access the PC remotely. About the hardware clock sync, even so, it should work... probably is a Task scheduler misbehavior. I deleted the task and create a new one, but happens exactly the same.

            – Alex Angelico
            Aug 12 '10 at 20:24





            Yes, that could be a solution, but what I really want is the PC to start at 8:45 (this works via the BIOS) and shutdown at 8:00 pm, because sometimes I don't even go to the office but I access the PC remotely. About the hardware clock sync, even so, it should work... probably is a Task scheduler misbehavior. I deleted the task and create a new one, but happens exactly the same.

            – Alex Angelico
            Aug 12 '10 at 20:24













            0














            I was having the similar problem. (My task was set to run at 5:30 PM and then wait for 15 minutes of inactivity before suspending.)  In my case, it would work fine so long as the computer was running at 5:30 PM every day. If it ever missed the task due to being suspended, it would run the task on resume (and yes, I had also unchecked "Run task as soon as possible after a scheduled start is missed"). It would then suspend the computer after being resumed and having 15 minutes of inactivity.



            So, here's my solution:




            1. Edit your task's trigger. Check "Delay task for up to:" and select "1 minute"


            2. Create a batch file named "kill.bat"




              @echo off
              timeout 10
              schtasks /end /tn TaskName           # (Replace TaskName with the name of your task.)


              You may have to tinker with the timeout number. What you're looking for is for some amount of time (in seconds) that falls between a) the time required for the OS's clock to synchronise after resume, and b) the amount of time you delayed your task to run. Setting this number can get squirrelly given that the delay time is a maximum amount and not a specific amount. Try to set this timeout as close as possible to the time needed for the OS's clock to synchronize.




            3. Create a second task – this task will run the batch file you just created upon system resume.




              Trigger:
              Begin the task: "On an event"
              Log: System
              Source: Power-Troubleshooter
              Event ID: 1
              Action:
              Select the batch file you created in step 2.


              When configured properly, this new task should run on resume and kill the original task during the 1 minute delay you added to its configuration.








            share|improve this answer






























              0














              I was having the similar problem. (My task was set to run at 5:30 PM and then wait for 15 minutes of inactivity before suspending.)  In my case, it would work fine so long as the computer was running at 5:30 PM every day. If it ever missed the task due to being suspended, it would run the task on resume (and yes, I had also unchecked "Run task as soon as possible after a scheduled start is missed"). It would then suspend the computer after being resumed and having 15 minutes of inactivity.



              So, here's my solution:




              1. Edit your task's trigger. Check "Delay task for up to:" and select "1 minute"


              2. Create a batch file named "kill.bat"




                @echo off
                timeout 10
                schtasks /end /tn TaskName           # (Replace TaskName with the name of your task.)


                You may have to tinker with the timeout number. What you're looking for is for some amount of time (in seconds) that falls between a) the time required for the OS's clock to synchronise after resume, and b) the amount of time you delayed your task to run. Setting this number can get squirrelly given that the delay time is a maximum amount and not a specific amount. Try to set this timeout as close as possible to the time needed for the OS's clock to synchronize.




              3. Create a second task – this task will run the batch file you just created upon system resume.




                Trigger:
                Begin the task: "On an event"
                Log: System
                Source: Power-Troubleshooter
                Event ID: 1
                Action:
                Select the batch file you created in step 2.


                When configured properly, this new task should run on resume and kill the original task during the 1 minute delay you added to its configuration.








              share|improve this answer




























                0












                0








                0







                I was having the similar problem. (My task was set to run at 5:30 PM and then wait for 15 minutes of inactivity before suspending.)  In my case, it would work fine so long as the computer was running at 5:30 PM every day. If it ever missed the task due to being suspended, it would run the task on resume (and yes, I had also unchecked "Run task as soon as possible after a scheduled start is missed"). It would then suspend the computer after being resumed and having 15 minutes of inactivity.



                So, here's my solution:




                1. Edit your task's trigger. Check "Delay task for up to:" and select "1 minute"


                2. Create a batch file named "kill.bat"




                  @echo off
                  timeout 10
                  schtasks /end /tn TaskName           # (Replace TaskName with the name of your task.)


                  You may have to tinker with the timeout number. What you're looking for is for some amount of time (in seconds) that falls between a) the time required for the OS's clock to synchronise after resume, and b) the amount of time you delayed your task to run. Setting this number can get squirrelly given that the delay time is a maximum amount and not a specific amount. Try to set this timeout as close as possible to the time needed for the OS's clock to synchronize.




                3. Create a second task – this task will run the batch file you just created upon system resume.




                  Trigger:
                  Begin the task: "On an event"
                  Log: System
                  Source: Power-Troubleshooter
                  Event ID: 1
                  Action:
                  Select the batch file you created in step 2.


                  When configured properly, this new task should run on resume and kill the original task during the 1 minute delay you added to its configuration.








                share|improve this answer















                I was having the similar problem. (My task was set to run at 5:30 PM and then wait for 15 minutes of inactivity before suspending.)  In my case, it would work fine so long as the computer was running at 5:30 PM every day. If it ever missed the task due to being suspended, it would run the task on resume (and yes, I had also unchecked "Run task as soon as possible after a scheduled start is missed"). It would then suspend the computer after being resumed and having 15 minutes of inactivity.



                So, here's my solution:




                1. Edit your task's trigger. Check "Delay task for up to:" and select "1 minute"


                2. Create a batch file named "kill.bat"




                  @echo off
                  timeout 10
                  schtasks /end /tn TaskName           # (Replace TaskName with the name of your task.)


                  You may have to tinker with the timeout number. What you're looking for is for some amount of time (in seconds) that falls between a) the time required for the OS's clock to synchronise after resume, and b) the amount of time you delayed your task to run. Setting this number can get squirrelly given that the delay time is a maximum amount and not a specific amount. Try to set this timeout as close as possible to the time needed for the OS's clock to synchronize.




                3. Create a second task – this task will run the batch file you just created upon system resume.




                  Trigger:
                  Begin the task: "On an event"
                  Log: System
                  Source: Power-Troubleshooter
                  Event ID: 1
                  Action:
                  Select the batch file you created in step 2.


                  When configured properly, this new task should run on resume and kill the original task during the 1 minute delay you added to its configuration.









                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 21 '15 at 11:41









                G-Man

                5,705112360




                5,705112360










                answered Jun 21 '15 at 10:47









                notorious.ddsnotorious.dds

                11




                11






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f170671%2fmissed-windows-task-runs-when-the-computer-starts%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Plaza Victoria

                    In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                    How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...