Task Scheduler or Idiot User Problem?


  1. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
       #1

    Task Scheduler or Idiot User Problem?


    Recently I had some discussions about the Task Scheduler.

    https://www.sevenforums.com/723840-post1646.html

    I was directed to Brink's tutorial about the subject.

    Task Scheduler - Create New Task


    1. I want my PC to wake up at a certain time (once per week), just before AVG is scheduled to do its virus scan.
    2. I created a task which is supposed wake the PC and display a message.
    3. My PC is set to go to sleep after 2 hours, so I set the wake up time to ~5 minutes before AVG is supposed to do its scan & get its updates.
    4. AVG is not performing its scan (it won't scan if the PC is asleep).
    5. I know that the AVG scan works, because if the computer isn't asleep, the scan runs.
    6. I was expecting the "display a message" task to bring up a dialogue box (with an OK button to dismiss it).
    7. I don't see any messages when I log in to my account.
    8. I followed the tutorial and according to the Task Scheduler history the task runs (the task is supposed to run for 2 hours and then be terminated).
    9. It seems like the task runs, wakes the PC, displays the message and then immediately goes back to sleep (I can't confirm this as I am generally not up at 4:00 am).


    In build 7100 I tried the same thing.
    The task didn't run but gave a gibberish error message - 0x00blahblah.
    I am pretty sure that I had used the same steps outlined in the tutorial on build 7100 anyway - I used the wizard and then went back and entered my password.
    I got around the problem by creating a task to run a program.

    When I tried this work-around in build 7600, the task wouldn't terminate despite being set to end (forced) after 2 hours.

    I could create a task to use the Command line instruction to run the virus scan.
    The trouble is, that in the past when I have used that command, it didn't list the results in the scan log.

    The only way that I can see to get around this, is to disable the auto-sleep function (i.e. manually put the PC to sleep every night, except the night it is supposed to do its virus scan).

    Any suggestions?
    Last edited by lehnerus2000; 29 May 2010 at 22:21. Reason: Correction
      My Computer


  2. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
       #2

    Hello Lehnerus,

    You would need to change how long Windows 7 will wait to go back to sleep mode automatically after waking up unattended (no activity made by the actual user) and idle. The default time is only 120 seconds (2 minutes), so you would need to set this for how long it may take for the program to run instead. The tutorial below can help show you how to. It will be the same in Windows 7.

    Sleep Return Timeout for Unattended Wake Up - Vista Forums

    Hope this helps,
    Shawn
      My Computer


  3. Posts : 53,363
    Windows 10 Home x64
       #3

    Two things, check setting in Advanced Power Settings, "allow wake timers" is set to enable.

    In the task scheduler, click “Conditions” tab and make sure that “Wake the computer to run this task” is checked.

    Also, can you schedule the task at a time you are awake as a test? After you have allowed the PC to sleep normally, so you can confirm what it is/is not doing?


    A Guy
      My Computer


  4. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #4

    Thanks Brink & A Guy


    Thanks for your replies/suggestions.

    Brink said:
    Hello Lehnerus,

    You would need to change how long Windows 7 will wait to go back to sleep mode automatically after waking up unattended (no activity made by the actual user) and idle. The default time is only 120 seconds (2 minutes), so you would need to set this for how long it may take for the program to run instead. The tutorial below can help show you how to. It will be the same in Windows 7.

    Sleep Return Timeout for Unattended Wake Up - Vista Forums

    Hope this helps,
    Shawn
    I didn't realise that I had to edit the Registry.


    A Guy said:
    Two things, check setting in Advanced Power Settings, "allow wake timers" is set to enable.

    In the task scheduler, click “Conditions” tab and make sure that “Wake the computer to run this task” is checked.

    Also, can you schedule the task at a time you are awake as a test? After you have allowed the PC to sleep normally, so you can confirm what it is/is not doing?


    A Guy
    I have set both of those options.

    Here is a png which shows the relevant settings (hopefully).

    Task Scheduler or Idiot User Problem?-pc-wake-up.png

    My screen capture came out a bit rough!
    Hopefully my task will now run correctly.
    I would have clicked your rep button again Brink, but it wouldn't let me. :)
    Last edited by lehnerus2000; 30 May 2010 at 03:03. Reason: Correction
      My Computer


  5. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
       #5

    That's ok Lehnerus. Please let us know how it went. :)
      My Computer


  6. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #6

    PC Woke Up During Test Run (Hooray)


    I just ran a test and the PC woke up.
    I didn't notice a message box though (I chose "display a message" as the action).

    It looks like your Reg Edit tip has fixed the problem, Brink.

    I'll do a combined test and virus scan later this week (to be 100% sure).

    Thanks, once again.
      My Computer


  7. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
       #7

    You're most welcome Lehnerus. I'm happy to hear that it seems to be working now for you. :)
      My Computer


  8. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #8

    Full Test Result


    I just ran a full test and apart from not noticing the message, everything else worked as expected. :)

    I guess the message could be one of those slide up notifications that appear over the Sys tray.
    I have to log in to my account if the computer has been asleep, so the message could have been displayed and disappeared before I was able to view it.

    Thanks for your assistance.

    Perhaps the "Sleep Return Timeout for Unattended Wake Up" link could/should be added to the other Task Scheduler tutorials (and a note/warning about the 2 minute default).
    For example:
    Task Scheduler - Create New Task
      My Computer


  9. Posts : 72,037
    64-bit Windows 11 Pro for Workstations
       #9

    Good idea. Done. :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:59.
Find Us