Waking up out of suspended mode to make a backup

Discussion in 'Acronis True Image Product Line' started by kolban, Oct 27, 2007.

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

    kolban Registered Member

    Joined:
    Oct 27, 2007
    Posts:
    2
    Folks,
    I have purchased TI 10 and am running in on a Vista system. My PC is configured to suspend itself after a couple of hours of activity. What I seem to find is that the tasks scheduled to occur in the early hours don't happen because the machine is suspended. Is there a way to cause the PC to wake up/resume in order to take a backup through the scheduled tasks? When I start my work day in the morning it is not a good time to take a deferred backup as that is my busy time ... 2:00am is ideal.

    Neil
     
  2. rwt325

    rwt325 Registered Member

    Joined:
    Jul 28, 2005
    Posts:
    101
    Location:
    Strasburg VA
    See the next thread.
     
  3. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    The ATI scheduler wil not wake a pc from standby. You have to use Window's task scheudler to do that. For ATI 10, the command is "[path]\trueimageservice.exe" where the [path] is the actual path and the parameters are /script "[path][tis filename]". The command get it's own set of quotes as does the last parameter. the /script: doesn't go inside quotes. So it should look like this:

    "C:\Program Files\Common Files\Acronis\TrueImage\TrueImageService.exe" /script:"C:\Documents and Settings\All Users\Application Data\Acronis\TrueImage\Scripts\9E1E193F-40A6-4CC8-9AF1-FBA14B36D58D.tib.tis"

    IF you have ATI 11, then the trueimage directory might be "trueimagehome" and the service might be trueimagehomeservice.exe.

    In the Advanced properties for the Windows task, be sure to check the box for wake computer from standby.

    To figure out which tis file is which, edit a task, make a change, change it back and then save it, then go the the directory and look for which file has the most current time-date stamp.

    IN ATI 10, the direcvtory is
    C:\Documents and Settings\All Users\Application Data\Acronis\TrueImage\Scripts\

    in ATI 11 I think its
    C:\Documents and Settings\All Users\Application Data\Acronis\TrueImagehome\Scripts\
     
    Last edited: Oct 29, 2007
  4. kolban

    kolban Registered Member

    Joined:
    Oct 27, 2007
    Posts:
    2
    I am having trouble finding the scripts directory with ATI v11 on a Vista system ... do you happen to know where to look?

    Neil
     
  5. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Neil:

    With a default installation of ATI 10 on Vista, the scripts are in C:\Program Data\Acronis\True Image\Scripts

    I hope you have better luck than we did. I think you will find that Vista's Task Scheduler suffers from narcolepsy. The task will wake the machine like it is supposed to and will start to run, but the machine will fall back asleep 2 minutes later. There is some more information in this thread. Let us know if you get it working correctly.
     
  6. Cbones

    Cbones Registered Member

    Joined:
    Jan 4, 2008
    Posts:
    6

    I used this method to initiate my backup in TIH11, but now the task seems to be running twice each night. Windows Task Scheduler wakes the computer and that task will run first, and then the task wants to run from in Acronis. The result is 2 tasks which is filling my backup location twice as fast. How can I disable the task from being launched by Acronis task scheduler?
     
  7. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Cbones:

    I always wondered what would happen if you had both schedulers set up to do the same task.

    See post #25 in this thread.
     
  8. Cbones

    Cbones Registered Member

    Joined:
    Jan 4, 2008
    Posts:
    6
    Mark,

    Fast repsonse! I figured it out though, I just set the script to run manually instead of daily when creating the script. Then Windows Task Scheduler is used to launch the "manual task" each night, and the Acronis task wont run at all.
     
  9. Bruce Mahnke

    Bruce Mahnke Registered Member

    Joined:
    May 21, 2005
    Posts:
    629
    Location:
    Woodbury, MN USA
    Mark is correct. I believe that the actual selection should be [Manually later]. Modifying the ATI scheduler will most likely change the script name which would then have to be updated in Windows Scheduled Tasks.

    Bruce
     
  10. Cbones

    Cbones Registered Member

    Joined:
    Jan 4, 2008
    Posts:
    6
    For whatever reason, now since using Windows scheduler, TIH11 no longer sends an email after it completes. When Acronis task scheduler did run, it properly sent a confirmation email. Yes, I checked to see if the task contained the proper email set-up parameters and successfully sent a test email. Has anyone else noticed this?

    Carl
     
  11. kenterm

    kenterm Registered Member

    Joined:
    May 8, 2006
    Posts:
    5
    I am using Xp Sp2 - ATI 11.0 latest build. If I prefer to schedule my middle of the night backups by using your method, will it work with Xp as well as Vista? I have read the problems concerning standby and even thought I do not use it it seems that scheduling would be more consistent using the Windows scheduler. Also, would I create a .bat file containing the command as you describe below [including the quotes] and just schedule that batch file to run when I want? Do I have to change the schedule in the ATI Task to "Manual" so that the schedule time stored in the script file does not override? I hope I understood your post and I am not asking a stupid question.

     
  12. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    Yu don't need a batch file to launch and ATI task fromthe Windows Scheduler. Just create a task in Windows Scheduler with the command line I posted above, which is basically the following including the quotes:

    "[path]TrueImageService.exe." script:"[path\scriptfilename]"

    At the appointed time, Windows Task scheduler runs the command line and thereby calls trueimageservice, which is the ATI10 service that runs ATI10 tasks, and the service runs the script file fed to it as a parameter on the comand line.

    You should set the password in Windows Scheduler and set set the StartUp Directory to be the directory where the trueimageservice.exe file is located

    The Task in ATI should be set to Manual unless you want to to be scheduled to run by both schedulers.

    When setting up Windows Scheduler, click on the Settings tab and be sure to check the box for Wake Computer to Run This Task.


    If using ATI10 with XP then the command line would probably look like this:

    "C:\Program Files\Common Files\Acronis\TrueImage\TrueImageService.exe" /script:"C:\Documents and Settings\All Users\Application Data\Acronis\TrueImage\Scripts\9E1E193F-40A6-4CC8-9AF1-FBA14B36D58D.tib.tis"

    If using ATI 11 with XP then the command line would be slightly different:

    "C:\Program Files\Common Files\Acronis\TrueImageHome\TrueImageHomeService.exe" /script: "C:\Documents and Settings\All Users\Application Data\Acronis\TrueImageHome\Scripts\204CA232-DABA-4955-B30E-CBF7A83F2722.tib.tis"


    With Vista the path for the script files is slightly diff as discussed above by other posters.

    good luck


     
  13. kenterm

    kenterm Registered Member

    Joined:
    May 8, 2006
    Posts:
    5
    Thanks for the quick reply. I will follow your instructions and give it a try.

    Ken
     
  14. SHP

    SHP Registered Member

    Joined:
    Mar 12, 2008
    Posts:
    30
    Like others on this forum, I'm having a devil of a time trying to schedule an ATI backup or image task to run when my computer (running Vista) is in "sleep" mode.

    As we know, ATI's scheduler does not currently have the ability to "wake" the machine from sleep mode. I have tried to use the windows task manager by having it run the command "C:\Program Files\Common Files\Acronis\TrueImageHome\TrueImageHomeService.exe" /script:"C:\ProgramData\Acronis\TrueImageHome\Scripts\###############.tib.tis" (as set forth in this thread:

    https://www.wilderssecurity.com/showthread.php?t=189475

    Unfortunately, while using the windows task manager will wake the machine and begin to run the ATI task, the computer falls back to sleep after running the task and only completes it when I manually awaken the computer (e.g. by touching the mouse). Last night I installed the latest scheduler from ATI, and then redid the tasks. That did not seem to help; the computer still fell back asleep two minutes into the ATI task.

    I think I may have a solution, but I'll need some help from greater minds. In another thread discussing this topic a poster pointed to the following link to the vistaheads forum:

    http://www.vistaheads.com/forums/mi...es-doesnt-wait-task-end-then-goes-back-s.html

    Toward the bottom of that thread someone suggests a solution that involves invoking the SetThreadExecutionState "command". Aparently, when combined with the correct "argument" the SetThreadExecutionState command can tell the computer not to fall asleep. So the key would be to use that command before the ATI task runs and then reverse the command after the ATI task is complete (assuming you want the computer to fall back asleep).

    I've noticed that when creating an ATI task in the ATI task manager, it specifically allows you to run commands before and after the ATI task itself. So I was thinking that if you could somehow include the SetThreadExecutionState "turn off sleep" before and the SetThreadExecutionState "turn on sleep" after then you'd be set. However, I'm not sure how to do it. First, I'm not sure if the ATI task manager allows you to imput the SetThreadExecutionState commands directly or if you'd need to point to a script of some sort. Secondly, I'm not exaclty sure how to write the command itself.

    If someone knows something about the SetThreadExecutionState command, perhaps they can chime in.
     
  15. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    SHP:

    I'd like to know how to do that too. My neighbor is a pretty good Windows programmer, so I intend to pick his brain some day. The basic approach could be to write a batch file that first calls a Visual Basic routine to set the ThreadExecutionState, then manually starts the TI scheduler from the command line, then clears the ThreadExecutionState before exiting. The Vista scheduler then would only have to call the batch file.

    Also, perhaps this issue is fixed in Vista SP1. I just finished installing SP1 but haven't yet checked to see if it's fixed. It isn't mentioned on the list of issues fixed by SP1, however.
     
  16. SHP

    SHP Registered Member

    Joined:
    Mar 12, 2008
    Posts:
    30
    Mark: Please let me know what you learn both about SP1 and from your neighbor.

    Rather than have windows task manager run the three commands (one to turn off sleep, one to run the ATI script, and one to turn sleep back on), my idea was to try to imbed the first and third command in the ATI command itself. When you go through the Wizard it has a feature that apparently allows you to do something before and after the task runs.

    At the end of the day, I don't think there should be any difference.

    What's so frustrating is that my NTI BackupNOW will run a task on this machine even when it's sleeping. But I've got other problems with that program! Argghhh. This is supposed to (or at least should) be easy!
     
  17. SHP

    SHP Registered Member

    Joined:
    Mar 12, 2008
    Posts:
    30
    The following presentation by a Microsoft guy might be of interest. http://ampalliance.org/files/folders/81/download.aspx
    I'm not a programmer but this reads like MS made some changes to power management for Vista to make it more reliable. It seems that they tried to inform programmers that under Vista, drivers and aps "do not veto sleep transistions." I'm not sure what that means, but the presentation goes on to suggest that developers had better be prepared for the change.

    Page 15 seems to list the proper "calls" to disable and re-enable sleep:

    First:

    SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED)

    Then:

    SetThreadExecutionState(ES_CONTINUOUS).

    I have no idea how to implement this.
     
  18. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    I am pretty sure that I know what this means. Under XP, an errant driver (video, for example) could prevent the system from entering standby. Under Vista, the driver is given 2 seconds to clean up and exit. After 2 seconds, Vista will forcibly terminate all drivers that are preventing the system from entering sleep mode and go to sleep regardless.

    I think the idea was to guarantee that when you close the lid on your laptop you can depend on the system entering sleep reliably. In order to achieve this, they made this consideration top priority at the expense of any other considerations. So for our example here, if the system idle timer indicates that the system has had no user activity and should enter sleep it will, even if a scheduled task is running.

    Thank you for the link to the presentation. I'm not a programmer either so I don't understand the details but I get the general idea. I'll post back here if I can get my neighbor to help me write a "stay awake" routine for Vista scheduled tasks. To be honest, I've worked around this by scheduling my TI backups to take place at lunch time. They complete fairly quickly and even if I need to use the PC while a backup is taking place, I hardly notice the background activity.
     
  19. shieber

    shieber Registered Member

    Joined:
    Oct 27, 2004
    Posts:
    3,710
    No, it shouldn't change the script name.

     
  20. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello SHP,

    Thank you for choosing Acronis Disk Backup Software.

    Thank you for bringing that presentation to attention. I will forward it to our Development Team. It's likely that with that information it will be possible to allow our scheduler to wake Vista from sleep to perform tasks, and put it back to sleep after it's finished.

    Thank you.
    --
    Marat Setdikov
     
  21. SHP

    SHP Registered Member

    Joined:
    Mar 12, 2008
    Posts:
    30
    Marat:

    You're welcome. If you guys can knock out this problem and also fix the stalling backup problem, I'll be thrilled.

    For what it's worth, I am currently handling the scheduled backups by shutting my computer down and night and having it turn on automatically (via my BIOS) early in the morning. I've use the ATI scheduler to schedule a backup when the computer restarts for the first time. So far that seems to work. Obviously, it's not ideal, but if Acronis is really going to try to tackle the scheduling problem, I can be patient for a while.

    Good luck!
     
  22. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello Cbones,

    Thank you for choosing Acronis Backup software

    The possible reason of the issue can be that the confirmation letters are sent, but they are not delivered to your e-mail. We can find this out from the operation log. You can pick it up in the following way:

    - Start Acronis True Image;
    - Select Tools -> Show log;
    - Choose the log entry corresponding to the scheduled task under consideration;
    - Click on the diskette icon, choose the location (folder) and save there;

    So we recommend you to submit request to Acronis Support Department with the attached simple log to let us investigate if the confirmation letter has really been sent. It would be also much appreciated if you also attach Windows sysinfo file as described in Acronis Help Post. This would provide us with additional information which would help us to investigate the issue.

    Thank you
    --
    Nikita Sakharov
     
  23. bcronin

    bcronin Registered Member

    Joined:
    Jun 24, 2004
    Posts:
    105
    Location:
    Hyde Park, NY USA
    I posted about this issue a year ago and tried in vain to find someone who could write a command-line utility to do the setthreadexecutionstate call to disable/re-enable sleep. I also made Acronis aware of the issue through these forums. Nothing ever happened.

    I eventually gave up and bought a Windows Home Server to do my backups (and it seems that since MS wrote that sw, they know enough to do the setthreadexecutionstate thing before/after their backup, so it all just works).

    But I would still like to have such a utility because silly Vista ALSO goes to sleep 2 minutes after I wake it up from across the LAN (e.g. I might be upstairs and want to do some work on the PC downstairs, but if I don't do anything for 2 minutes, the darn thing goes back to sleep and I have to wake it back up again). So if you ever come up with such a tool, I'd be very interested in getting a copy.

    I'm all for power savings, but (dammit) if I wake the thing up from across the LAN I really wish it would stay awake for the period that's configured in the power policy.
    --
    bc
     
  24. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    There is now a solution to this problem, thanks to the contributors to this thread and to my neighbor Chris, who understands Windows Applications programming.

    I've written a guide that explains how to set up a Vista Scheduled Task that will wake the PC and perform the scheduled action without falling asleep two minutes after waking up. The PC will remain awake until the scheduled task has completed and then revert to normal Vista power management settings. If there has been no user activity then the PC will go back to sleep after completing the scheduled task.

    My illustrated guide (pdf document) can be downloaded from here.

    A big thanks to Chris for writing the StayAwake utility, which can be downloaded from here.
     
  25. SHP

    SHP Registered Member

    Joined:
    Mar 12, 2008
    Posts:
    30
    Way to go, Mark! I'm glad the manual I found helped. I'm testing the solution right. So far, so good!

    Now, Acronis, about Mark's consulting fee . . .;)
     
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.