Operating System Win 7 task scheduler (1 Viewer)

joz

Portal Pro
March 17, 2008
1,353
306
Home Country
Netherlands Netherlands
Hi all,

I have been on win 7 with my main htpc/server a while now and still not figured this one out.
I have a couple batch files lying around which work perfectly, they need to be scheduled either on a day or an hour basis. Those batches run fine when just firing them manually (dubbelclick) however they do never run from task scheduler and I'm clueless of the cause...

The schedules are defined to run with highest priveleges, run by an account with administrator priviliges so I would say that is good enough for any kind of task. These same batches I could schedule fine (and they ran) in windows XP.
Looking at my windows 7 logs I never see my batches getting triggered...

Any body got some tips? I'm pulling my hair out, that frustrating it is when something simple as this takes up so much of my time.
 

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    joz

    Try moving the batch files to your documents folder, I had trouble running from programs folders, does seem to be a permissions thing.

    Ignore if you have already tried that, as I'm out of other ideas atm :(
     

    joz

    Portal Pro
    March 17, 2008
    1,353
    306
    Home Country
    Netherlands Netherlands
    :D Paranoid Delusion, haven't given that a try yet.
    I know this from previous windows versions, program files folder always used to be handled differently permission wise for whatever reason.
    They used to advice to not install apache in program files for this reason for example.
    Just haven't thought of it yet so thanks, giving it a go and will let you know

    ---EDIT---

    That did not work. Just discovered something new, according to the task scheduler window and the button "display all running tasks" CMD is running when I have triggered it to run manually.
    So it does something, CMD however does not seem to do anything.

    ---EDIT2---
    Onto something now, going thru it by elimination because it's seems I'm kinda blind to the issue that causes it.
    It seems that when I do not check "run when user is logged in or not" it works, kinda. It triggers mc2xml (one of the batches does that) but doesn't pass along the arguments.... sigh.

    ---EDIT3---
    At least finally I have something that's working, although the HTPC user needs to be logged in for it to run (which it is anyways so doesn't really mather). I can not for the live of me get it going when I checked it to run whether the user is logged in or not. The password I entered is 100% correct and already tried dozens of times.
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    Something else you might want to just try, lower the account UAC settings just for test purposes.

    Another thing I have just noticed, mine are set to run as Vista\2008 priviliges, not as Win7 by default.
     

    andrewNZ

    Portal Member
    March 31, 2010
    29
    0
    Dunedin
    Home Country
    New Zealand New Zealand
    If You havn't already solved your issue.

    I stumbled across the solution by accident.
    When you create the action, the program name needs to go in the box for 'program/script' and the path to find it goes in the 'start in' box.
    The easy way is to browse for the file and then cut and paste the path from one box to the other. Make sure you remove the quotes from either end.

    Hope this helps
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Another thing to think about: Tasks will not bes scheduled if the user that performs the scheduling has no password. So you need to setup a password protected user (you can use the auto-logon feature windows has if you do not want to enter it).

    I hope this helps.
     

    genivos

    Portal Member
    October 7, 2007
    10
    0
    Home Country
    Netherlands Netherlands
    I didn't see a proper resolution on this thread yet, tried everything here (even more! :D was almost going back to Vista :mad: ) and I was trying to figure it out myself as well. What worked for me:

    1. Make one task waking up the PC at 4:55am and run ping <local router IP>
    2. Second task to run the actual task at 5:00am (also turned on wake up in this task)

    It seems that when you use wake up and run the actual task you want to run in one task, it DOES wake up the PC but after a while (can be a day, couple days, week) it doesn't run the batch/script/whatever you want to run anymore. This way it seems to work fine for me, first wake up with one task, second run the util to fetch the tvguide.

    Furthermore I found a way to actually run the task with system privileges. Not sure if that is needed but it might be useful. I let it run with system privileges. Here is the information on how to do that:

    (iBoyd) » Scripting a Scheduled Wakeup in Windows 7 (and Vista too!)

    Hope this helps for others as well!

    ;)
     

    Users who are viewing this thread

    Top Bottom