Windows Task Scheduler, run task if task isn't running?












2















How do I ensure a task is running all the time?



I use speedfan to control my fans and on occasion it crashes or it needs to be restarted. If I manually quit speedfan because it isn't working correctly it doesn't reopen automatically.



How can I use the Task Scheduler to ensure it always runs, even if it isn't running?



Currently it is set to run everytime I log on and is set to restart if the task fails but it still isn't reopening.



Thanks










share|improve this question



























    2















    How do I ensure a task is running all the time?



    I use speedfan to control my fans and on occasion it crashes or it needs to be restarted. If I manually quit speedfan because it isn't working correctly it doesn't reopen automatically.



    How can I use the Task Scheduler to ensure it always runs, even if it isn't running?



    Currently it is set to run everytime I log on and is set to restart if the task fails but it still isn't reopening.



    Thanks










    share|improve this question

























      2












      2








      2








      How do I ensure a task is running all the time?



      I use speedfan to control my fans and on occasion it crashes or it needs to be restarted. If I manually quit speedfan because it isn't working correctly it doesn't reopen automatically.



      How can I use the Task Scheduler to ensure it always runs, even if it isn't running?



      Currently it is set to run everytime I log on and is set to restart if the task fails but it still isn't reopening.



      Thanks










      share|improve this question














      How do I ensure a task is running all the time?



      I use speedfan to control my fans and on occasion it crashes or it needs to be restarted. If I manually quit speedfan because it isn't working correctly it doesn't reopen automatically.



      How can I use the Task Scheduler to ensure it always runs, even if it isn't running?



      Currently it is set to run everytime I log on and is set to restart if the task fails but it still isn't reopening.



      Thanks







      windows tasks speedfan






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 6 '16 at 20:18









      George OthenGeorge Othen

      1314




      1314






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Task Scheduler - run task if it isn't running



          You can use a batch script similar to the below and use Tasklist and FindStr to check whether or not the EXE name of SpeedFan is running in memory. With the below logic it'll Start the EXE if is not found running in memory.





          Batch Script Example



          Be sure to replace the SpeedFan.exe value with the actual name of the EXE file that runs when you launch the app and it's working properly if it's something different in the SET EXEName=SpeedFan.exe.



          You will need to ensure the full explicit path to the EXE is also in the below logic of what it actually is so just replace that (in the SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe) with the real path of the app EXE; after the = sign is where you'll change that.



          Just scheduled this to run with Task Scheduler every 1 minute, 30 seconds, or however often you'd like this process to check if it's running or not and if not to then start it.



          @ECHO OFF

          SET EXEName=SpeedFan.exe
          SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe

          TASKLIST | FINDSTR /I "%EXEName%"
          IF ERRORLEVEL 1 GOTO :StartSpeedFan
          GOTO EOF

          :StartSpeedFan
          START "" "%EXEFullPath%"
          GOTO EOF





          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%2f1097766%2fwindows-task-scheduler-run-task-if-task-isnt-running%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Task Scheduler - run task if it isn't running



            You can use a batch script similar to the below and use Tasklist and FindStr to check whether or not the EXE name of SpeedFan is running in memory. With the below logic it'll Start the EXE if is not found running in memory.





            Batch Script Example



            Be sure to replace the SpeedFan.exe value with the actual name of the EXE file that runs when you launch the app and it's working properly if it's something different in the SET EXEName=SpeedFan.exe.



            You will need to ensure the full explicit path to the EXE is also in the below logic of what it actually is so just replace that (in the SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe) with the real path of the app EXE; after the = sign is where you'll change that.



            Just scheduled this to run with Task Scheduler every 1 minute, 30 seconds, or however often you'd like this process to check if it's running or not and if not to then start it.



            @ECHO OFF

            SET EXEName=SpeedFan.exe
            SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe

            TASKLIST | FINDSTR /I "%EXEName%"
            IF ERRORLEVEL 1 GOTO :StartSpeedFan
            GOTO EOF

            :StartSpeedFan
            START "" "%EXEFullPath%"
            GOTO EOF





            share|improve this answer






























              2














              Task Scheduler - run task if it isn't running



              You can use a batch script similar to the below and use Tasklist and FindStr to check whether or not the EXE name of SpeedFan is running in memory. With the below logic it'll Start the EXE if is not found running in memory.





              Batch Script Example



              Be sure to replace the SpeedFan.exe value with the actual name of the EXE file that runs when you launch the app and it's working properly if it's something different in the SET EXEName=SpeedFan.exe.



              You will need to ensure the full explicit path to the EXE is also in the below logic of what it actually is so just replace that (in the SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe) with the real path of the app EXE; after the = sign is where you'll change that.



              Just scheduled this to run with Task Scheduler every 1 minute, 30 seconds, or however often you'd like this process to check if it's running or not and if not to then start it.



              @ECHO OFF

              SET EXEName=SpeedFan.exe
              SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe

              TASKLIST | FINDSTR /I "%EXEName%"
              IF ERRORLEVEL 1 GOTO :StartSpeedFan
              GOTO EOF

              :StartSpeedFan
              START "" "%EXEFullPath%"
              GOTO EOF





              share|improve this answer




























                2












                2








                2







                Task Scheduler - run task if it isn't running



                You can use a batch script similar to the below and use Tasklist and FindStr to check whether or not the EXE name of SpeedFan is running in memory. With the below logic it'll Start the EXE if is not found running in memory.





                Batch Script Example



                Be sure to replace the SpeedFan.exe value with the actual name of the EXE file that runs when you launch the app and it's working properly if it's something different in the SET EXEName=SpeedFan.exe.



                You will need to ensure the full explicit path to the EXE is also in the below logic of what it actually is so just replace that (in the SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe) with the real path of the app EXE; after the = sign is where you'll change that.



                Just scheduled this to run with Task Scheduler every 1 minute, 30 seconds, or however often you'd like this process to check if it's running or not and if not to then start it.



                @ECHO OFF

                SET EXEName=SpeedFan.exe
                SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe

                TASKLIST | FINDSTR /I "%EXEName%"
                IF ERRORLEVEL 1 GOTO :StartSpeedFan
                GOTO EOF

                :StartSpeedFan
                START "" "%EXEFullPath%"
                GOTO EOF





                share|improve this answer















                Task Scheduler - run task if it isn't running



                You can use a batch script similar to the below and use Tasklist and FindStr to check whether or not the EXE name of SpeedFan is running in memory. With the below logic it'll Start the EXE if is not found running in memory.





                Batch Script Example



                Be sure to replace the SpeedFan.exe value with the actual name of the EXE file that runs when you launch the app and it's working properly if it's something different in the SET EXEName=SpeedFan.exe.



                You will need to ensure the full explicit path to the EXE is also in the below logic of what it actually is so just replace that (in the SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe) with the real path of the app EXE; after the = sign is where you'll change that.



                Just scheduled this to run with Task Scheduler every 1 minute, 30 seconds, or however often you'd like this process to check if it's running or not and if not to then start it.



                @ECHO OFF

                SET EXEName=SpeedFan.exe
                SET EXEFullPath=C:Program FilesSpeedFanSpeedFan.exe

                TASKLIST | FINDSTR /I "%EXEName%"
                IF ERRORLEVEL 1 GOTO :StartSpeedFan
                GOTO EOF

                :StartSpeedFan
                START "" "%EXEFullPath%"
                GOTO EOF






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 25 '18 at 11:44

























                answered Jul 6 '16 at 22:35









                Pimp Juice ITPimp Juice IT

                24k113973




                24k113973






























                    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%2f1097766%2fwindows-task-scheduler-run-task-if-task-isnt-running%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

                    Probability when a professor distributes a quiz and homework assignment to a class of n students.

                    Aardman Animations

                    Are they similar matrix