Windows 10: Close program each day with Task Scheduler?

Discus and support Close program each day with Task Scheduler? in Windows 10 Support to solve the problem; I cannot get it to work that Windows Task Scheduler closes a program each day. I have added this path C:\Dir Lw C\Programme\Rainlendar - Dirks... Discussion in 'Windows 10 Support' started by Bingus, Sep 5, 2016.

  1. Bingus Win User

    Close program each day with Task Scheduler?


    I cannot get it to work that Windows Task Scheduler closes a program each day.

    I have added this path
    C:\Dir Lw C\Programme\Rainlendar - Dirks Kalender (Daten etc.)\RainlendarPro schließen.lnk
    to a new task and the ink file is containing this
    "C:\Dir Lw C\Programme\RainlendarPro\App\Rainlendar64\Rainlendar2.exe" -e "Hotkey_Quit_Application()"


    Close program each day with Task Scheduler? [​IMG]


    But it does not work, what might be wrong?

    :)
     
    Bingus, Sep 5, 2016
    #1
  2. Ramesh Srinivasan, Sep 5, 2016
    #2
  3. Replacement battery for my Microsoft Lumia 950XL

    PRESS AND HOLD THE BACK ARROW ON THE TASK BAR, UNTIL ALL OF THE RUNNING PROGRAM TILES BECOME MINIATURIZED. THEN, TAP THE "X" IN THE UPPER RIGHT CORNER OF EACH TILE TO CLOSE EACH OF THE TILES. THIS WILL CLOSE ALL OF THE RUNNING PROGRAMS. NOW, THE PHONE
    SHOULD BE RUNNING MUCH COOLER AND USE A LOT LESS POWER. HOPE THIS HELPS.
     
    LeroyMolinari, Sep 5, 2016
    #3
  4. lx07 Win User

    Close program each day with Task Scheduler?

    What does the "Last run result" column say? That is the column after last run date/time.

    Could be you need to set it to "Run with highest privileges" but I don't know the program..

    You could also try a batch file with taskkill /F /IM Rainlendar2.exe (i.e copy that command into notepad, save it somewhere as "StopRainlander.bat" or something and use that instead of the shortcut.)
     
    lx07, Sep 5, 2016
    #4
  5. Bingus Win User
    Thank you, lx07.

    Is it this one:

    Close program each day with Task Scheduler? [​IMG]
    ?
    It says something like, no valid application or so.

    It is now checked, but does not work either.

    I have tried (double clicking that bat file closes Rainlendar), but the path is cut all the time (with the old path also):

    Close program each day with Task Scheduler? [​IMG]
     
    Bingus, Sep 5, 2016
    #5
  6. lx07 Win User
    The problem appears to be that you have spaces in your directory "C:\Dir LW C".

    Therefore you need quotes around it or it parses the big after the space after "C:\Dir" as an argument for the .exe.

    Sort of like this (which works OK for me).


    Close program each day with Task Scheduler? [​IMG]


    If you browse to the file (rather than adding the path manually) it adds the quotes for you.
     
    lx07, Sep 5, 2016
    #6
  7. Bingus Win User
    Ah, yes, that appears to work (for the bat file, not for the ink one) and with your code in the bat file and with quotes around the path.

    Yes, I browsed to the file, but no quotes were added, if I see it right.

    Great, thank you very much!
     
    Bingus, Sep 5, 2016
    #7
  8. lx07 Win User

    Close program each day with Task Scheduler?

    I'm using a insider test build of Windows at the moment, perhaps they have changed it. If it doesn't add quotes in current version it certainly should...

    Are you happy to use the .bat or you want to figure out what is wrong with the shortcut approach?
     
    lx07, Sep 5, 2016
    #8
  9. Bingus Win User
    Actually I am quite happy with the bat file, particularly because I can use such a bat file to close other programs, too.
    But I cannot get it to work using the complete path (so I could place the bat file in another directory) in the bat file with and without quotes: C:\Dir Lw C\Programme\RainlendarPro\App\Rainlendar64\Rainlendar2.exe

    So, instead of
    taskkill /F /IM Rainlendar2.exe
    this
    taskkill /F /IM C:\Dir Lw C\Programme\RainlendarPro\App\Rainlendar64\Rainlendar2.exe
    or
    taskkill /F /IM "C:\Dir Lw C\Programme\RainlendarPro\App\Rainlendar64\Rainlendar2.exe"

    May be there is another way.
     
    Bingus, Sep 5, 2016
    #9
  10. lx07 Win User
    It is a shag putting spaces in a path. Anyway you've done it.

    However if we are talking about taskkill then there is no need to put the path at all. The /IM means "WhateverThisIs.exe" so anything containing "Rainlandar64.exe" will be stopped.

    I'm not 100% sure what you want to do but you could make a .bat like this..

    Code: taskkill /F /IM Rainlendar2.exe taskkill /F /IM Notepad.exe taskkill /F /IM Outlook.exe taskkill /F /IM WinWord.exe[/quote] Not sure it is sensible (you would have to choose your programs and see if they can be stopped immediately) but you could.

    Anyway I'm off for a swim now - give it a go and I'll check in later.
     
  11. Bingus Win User
    Ah, now I see, I didn't know that.

    Yes, that should work. Thank you for the code.

    I just want to use a bat file outside the Rainlendar folder so I would not need to rebuild it after an update might have deleted the bat file.

    Alright, so have a good swim, until later, thank you very much.
     
    Bingus, Sep 5, 2016
    #11
  12. lx07 Win User
    Then just put it (or your shortcut) in C:\Users\Bingus\Documents\MyBatFiles (or something). That will work and would be better.

    Generally (although I don't know this program so perhaps the developers had some bizarre reason to do it) it is bad practice to put things in the root C:\

    The idea (simplistically put) is that you put shared programs in "C:\Program Files" and individual user data in "C:\Users\Bingus\<whatever>". The reason for this is authority - anyone can read a program but different users can't see others home directory (and so their private data). These authority restrictions will be automatically inherited from the folder higher in the hierarchy unless you chose as a developer to override it.

    While you can of course put a program anywhere you want (and give it any authority and restrictions you want) it is normally more convenient to follow standard procedures. My guess is your program is from the XP days when security was a little more, how can I put it, relaxed.

    And yeah, I did have a good swim - it is September so all the tourists have gone home and thanks to god I could get to the beach without tripping over toddlers *Smile
     
  13. Bingus Win User

    Close program each day with Task Scheduler?

    Yes, I have tried it, the bat file works in each folder, great.

    I use the portable version of Rainlendar, so that's why it is in that folder.

    Yes, I understand regarding the authority restrictions, using the programs the common way would be much more convenient. Almost all of my programs are portable so I very easily just could copy them to another drive / computer.

    No, no, that program is an actual program, running on Win 10, also.

    Oh yes, that sounds very good, swimming / walking on the beach without struggling over wretches and crying toddlers and dogs or slipping on guys greased with sun cream.
     
    Bingus, Apr 4, 2018
    #13
Thema:

Close program each day with Task Scheduler?

Loading...
  1. Close program each day with Task Scheduler? - Similar Threads - Close program each

  2. How can I get task scheduler to close a program the same as clicking on the red close...

    in Windows 10 Drivers and Hardware
    How can I get task scheduler to close a program the same as clicking on the red close...: Taskkill is too brutal. The software I am using performs some functions when it is closed normally then it closes.Any ideas? https://answers.microsoft.com/en-us/windows/forum/all/how-can-i-get-task-scheduler-to-close-a-program/349ce98e-2e83-4d87-bb0d-a896d9db9040
  3. How can I get task scheduler to close a program the same as clicking on the red close...

    in Windows 10 Gaming
    How can I get task scheduler to close a program the same as clicking on the red close...: Taskkill is too brutal. The software I am using performs some functions when it is closed normally then it closes.Any ideas? https://answers.microsoft.com/en-us/windows/forum/all/how-can-i-get-task-scheduler-to-close-a-program/349ce98e-2e83-4d87-bb0d-a896d9db9040
  4. How can I get task scheduler to close a program the same as clicking on the red close...

    in Windows 10 Software and Apps
    How can I get task scheduler to close a program the same as clicking on the red close...: Taskkill is too brutal. The software I am using performs some functions when it is closed normally then it closes.Any ideas? https://answers.microsoft.com/en-us/windows/forum/all/how-can-i-get-task-scheduler-to-close-a-program/349ce98e-2e83-4d87-bb0d-a896d9db9040
  5. What program lets me view Tasks in task scheduler and has some info. on what each task does?

    in Windows 10 Gaming
    What program lets me view Tasks in task scheduler and has some info. on what each task does?: I want to see them so that I can disable them one by one I'm disabling useless ones. https://answers.microsoft.com/en-us/windows/forum/all/what-program-lets-me-view-tasks-in-task-scheduler/741beaa2-d6d1-4131-8eb6-892b0a80b803
  6. What program lets me view Tasks in task scheduler and has some info. on what each task does?

    in Windows 10 Software and Apps
    What program lets me view Tasks in task scheduler and has some info. on what each task does?: I want to see them so that I can disable them one by one I'm disabling useless ones. https://answers.microsoft.com/en-us/windows/forum/all/what-program-lets-me-view-tasks-in-task-scheduler/741beaa2-d6d1-4131-8eb6-892b0a80b803
  7. Task scheduler task to detect and close window

    in Windows 10 Gaming
    Task scheduler task to detect and close window: I'm a maths teacher using CEmu for demonstration of the TI-84 graphic calculator in class. Possibly related to some W11 update, starting CEmu opens up an additional Terminal window at the side. Totally unnecessary and distracting, so I always close this Terminal window by...
  8. Task scheduler task to detect and close window

    in Windows 10 Software and Apps
    Task scheduler task to detect and close window: I'm a maths teacher using CEmu for demonstration of the TI-84 graphic calculator in class. Possibly related to some W11 update, starting CEmu opens up an additional Terminal window at the side. Totally unnecessary and distracting, so I always close this Terminal window by...
  9. How to quit/close a program using Task Scheduler ?

    in Windows 10 BSOD Crashes and Debugging
    How to quit/close a program using Task Scheduler ?: I would like to have Task scheduler close a program after computer has been idle for a set amount of time. Is there a way to do that ? I previously posted a question about my computer not waking from sleep and I could not find a solution. I think I've worked out that it's...
  10. Task Scheduler not running programs...

    in Windows 10 Support
    Task Scheduler not running programs...: Hello Guys, I have a Windows 10 Laptop. Tried using Task Scheduler to automatically run Good Sync program on a predefined schedule. However, it fails to run the program. My user account has administrative priviledges. Thanks for your replies. 37970