Forum Discussion

jsr_78's avatar
jsr_78
Occasional Contributor
13 years ago

Test execute scripts are not working when using schedule task

Hi,



We have scripts that we want to run on virtual machine (hvserver and it is XP image) and scheduled to run e.g. at 04:30 am in the morning. every evening we log off the virtual machine and we expect to run as per scheduled. The script is not working as expected. 



it works only if we don't log off. Can you please tell us will TE works on the virtual machine when it is logged off and if so how?



Thanks,

Srinivas

4 Replies

  • karkadil's avatar
    karkadil
    Valued Contributor
    AFAIK, it is impossible.



    In order to run scripts you must be logged on.



    Probably there is a workaround for this. You can try using aqEnvironment.RebootAndContinue method before start running scripts, but I am not sure if it will work...
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Gennadiy is correct.  If the automation needs to interact with the UI of the application under test, there needs to be some means for it to interact.  First of all, if it's logged off, it may be that it cannot run TE at all.  Secondly, even if it can run TE, since it is logged off, it cannot interact with a UI that cannot be displayed.



    I hadn't thought about the RebootAndContinue method... that's an intriguing work-around that I'll have to try.  However, what you probably should do is, for that VM, have it open in some sort of Console window on your VM server and then lock the server... that way the VM is always open, logged in and running but you preserve your security by locking down the server access to it.
  • karkadil's avatar
    karkadil
    Valued Contributor
    However try it first - should let know everyone else in this thread :)