Scheduling a task to start a program, when one other starts [How to?]

Discussion in 'other software & services' started by m00nbl00d, Nov 27, 2010.

Thread Status:
Not open for further replies.
  1. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    I've been searching the web for some info on how to schedule a task, so that when I start an application, one other I specify starts.

    AFAIK, Windows 7 scheduler lacks such option, unless I totally have missed it.

    So far I wasn't able to find anything that could allow me to do that.
    Are you familiar with a way that could do just that?


    Thanks
     
  2. whitedragon551

    whitedragon551 Registered Member

    Joined:
    Sep 30, 2008
    Posts:
    3,264
    Location:
    USA
    In the task scheduler go to the drop down menu. Action > Create Task.
    In the General tab fill it out. The trigger you want to set will be in the Actions tab and you can setup the trigger there.
     
  3. tony62

    tony62 Registered Member

    Joined:
    Aug 26, 2005
    Posts:
    214
    Location:
    UK
    Windows batch files would be easy to use & you can schedule them. Here is an example of how to start multiple programs at once:

    Code:
    start /d C:\Windows\System32\calc.exe
    start /d “C:\Program Files\Mozilla Firefox” firefox.exe
    start /d “C:\Program Files\Microsoft Office\Office12″ EXCEL.EXE
    More info
     
  4. iceni60

    iceni60 ( ^o^)

    Joined:
    Jun 29, 2004
    Posts:
    5,116
    you could try this search 'symlinks +mklink start task when a program executes'
     
  5. pajenn

    pajenn Registered Member

    Joined:
    Oct 26, 2009
    Posts:
    930
    If you have a reasonably powerful, multi-core computer, then take a look at Bill2's Process Manager. It's small, free and available as a portable application. It's mainly a process manager / smoother for adjusting process priorities and affinities (i.e. which cores a process can use), but it also has additional options for starting or killing (other) programs when a given process starts, ends or is over active or idle for too long (see pic). For example, when I start my tex editor of choice (BaKoMa TeX), Bill2 also launches a custom script of extra hotkeys and functions I have for it (I use AutoHotkey a lot).

    Note: Bill2 is not resource hungry per se, but for always-on use it's meant for multi-core computers (affinity control). To get the most out of it, you should run it in learning mode for a week or two, but that can be annoying as it would ask you how to handle each new process. (Kind of like the HIPS features of a firewall).
     

    Attached Files:

    Last edited: Dec 1, 2010
  6. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    Thanks!

    This is what I've been looking for. I will definitely take a look at it. Thanks a lot! :)
     
  7. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    I would say if all you want to do is have program B start whenever you start program A, a batch file would be the easiest. You could do this with just about any script language. If you place the batch file where program A lives, then put a shortcut to it on your desktop, you can change the icon to that of program A, and you won't notice the difference.

    Sul.
     
  8. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    Yes, but then I'd have to click the shortcut, as well.

    I could easily create a batch file that would start both apps at the same time, and perhaps with a small lag between each other, but I was just looking and wondering what other options would be out there, regarding scheduled tasks, because Windows own scheduler lacks such an option.

    I already have a batch file as you mentioned to start program A, and I could just change it to start program B as well, with a small lag between each other, but not really what I was looking for. It works fine, just not what I was aiming at. ;)
     
  9. whitedragon551

    whitedragon551 Registered Member

    Joined:
    Sep 30, 2008
    Posts:
    3,264
    Location:
    USA
    Actually it doesnt. I gave you instructions on how to do it.
     
  10. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    I looked at it, and couldn't find any option that could allow me? Maybe I missed it. I'll look at it again.

    -Edit-

    Let me know if this is what you mean. (Bear in mind that I'm not running the English version of Windows, and therefore my translation may not be the same as the real English version words.)

    I can see two more options, which are part of settings in the Actions tab:

    - Add arguments (optional):
    - Start with/Start in

    Now, in the Settings > Program/Script, the one to be added would be program B, which would start when program A is already running. Or, do you mean the opposite, add program A?

    In "Add arguments", which argument would be added to it? I'm assuming the arguments would be any that the application itself would accept when working with it using cmd line, right? How would any of its arguments allow me to start on other application?

    In "Start with/Start in", following the most logical thing to me, this would be where I'd put a path, for the other application? I tried that, but it didn't start the application. I tried both approaches (first one app., then the other one).

    Anyways, I believe the best option is just to create a batch/script file that would just check whether or not if program A is running, and if yes start program B, otherwise not start it.

    My initial wondering had to due with Windows own scheduler, that I thought had no such options, but according to you it has, though I still couldn't make it work. I guess I'll have to take a deeper look at it, though, because now I'm interested in making it work, just for the sake of it. ;)
     
    Last edited: Dec 1, 2010
  11. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    I guess it depends on just what you want. I often look for the "just right" solution rather than settle for what I don't want. Often it is just to satisfy my techno thrill-o-meter.

    For a batch file, here is an example for firefox and foxit (just pulling familiar apps out of thin air)

    batch file would reside in firefox directory

    start firefox.exe
    start /d "c:\program files\foxit\foxit.exe"

    * note that the /d is used to pass a directory different than the starting directory
    that should mean if the batch file lives in c:\program files\mozilla, you could just type
    start any_exe.exe
    and as long as it is in the starting/working directory, it is good.
    When needing to start programs in other directories, you would use the /d switch
    (don't know why you would need that, in the "old way" you just passed a fully qualified path)

    You might need to pass parameters as well, so it is helpful to take a look at how to pass those.

    create a shortcut on desktop to the batch file.
    change icon of the shortcut to the firefox icon.

    Double click shortcut to start both programs.

    Pretty much the same thing whitedragon551 said.

    Perhaps you are looking for a method to monitor when a program starts, like firefox, and when it does, start another program, like foxit, if it is not already running? Then you could start this "monitoring" program on bootup and it would always do its check, like every couple seconds. You could even turn that into a service so that if the "monitor" program was terminated for some reason, it would restart itself after a timeout.

    Sul.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.