Page 1 of 1

scripts getting failed when executed by scheduled task

Posted: Wed Feb 16, 2011 2:15 pm
by bheemuabhigna
Hi,

we have scheduled our scripts to run on our client machines at particular times twices a day.
The scripts executes and send the execution status in an excel to mail.
Daily we are getting failed status for all test cases. The reason will be some object not found in particular test cases.
The scripts executes fine when we execute them maually and I have scheduled it some time and observed that it is executing fine from scheduler.

But dont know whats happening when I come morning I am getting status as all failed. No doubt that the script is getting initiated as we are getting the report.

Can anyone tell me what might be the reason?. I have set Wake up the computer option also

Thanks
Abhigna

Re: scripts getting failed when executed by scheduled task

Posted: Wed Feb 16, 2011 4:00 pm
by Ciege
When the tests fail is the computer locked? If there is no available desktop then the automation will not have a GUI to work with and will fail when finding objects. Just waking the computer will not work it also need to be unlocked and logged in.

Re: scripts getting failed when executed by scheduled task

Posted: Thu Feb 17, 2011 10:45 am
by bheemuabhigna
Hi Ciege,

Thanks for the information provided

Thanks
Abhigna

Re: scripts getting failed when executed by scheduled task

Posted: Thu Feb 24, 2011 1:20 pm
by bheemuabhigna
Hi,

We have removed the lock option in the system where the execution is scheduled.
The problem is the scheduled task is added in machine available in client environment.
If I open the machine through remote desktop and keep it open the scripts will get passed.
If I close the remote desktop the scripts are getting failed.
As this is a seperate machine the scripts should execute on the machine seperately.
But , Why are the scripts getting failed when I close RDP window?
Have anyone experienced this issue before?

Thanks
Abhigna

Re: scripts getting failed when executed by scheduled task

Posted: Thu Feb 24, 2011 3:45 pm
by Ciege
Because when you close the RDP session there is no longer an available GUI for your AUT to run in. Therefore, Ranorex (or *ANY* automation solution) will fail when trying to find objects and elements... They just won't exist when there is not an available desktop to execute in.

Re: scripts getting failed when executed by scheduled task

Posted: Thu Feb 24, 2011 5:52 pm
by Support Team
bheemuabhigna wrote:But , Why are the scripts getting failed when I close RDP window?
The following forum post may also be interesting for you:
http://www.ranorex.com/forum/running-au ... t1295.html

Regards,
Alex
Ranorex Team

Re: scripts getting failed when executed by scheduled task

Posted: Tue Mar 15, 2011 9:55 am
by bheemuabhigna
Hi,

We were able to solve this issue.

The scripts are getting executing fine when RDP session is closed also, the issue was with system getting locked.
We removed the lock option and now everything works fine.

Thanks,
Abhigna

Re: scripts getting failed when executed by scheduled task

Posted: Thu Mar 17, 2011 8:54 am
by artur_gadomski
How did you do that?

Re: scripts getting failed when executed by scheduled task

Posted: Fri Mar 25, 2011 1:54 pm
by bheemuabhigna
It was a remote machine and so itteam from client side have worked on this.
We can get informating from windows sites also for removing this lock functianlity and also the process differs to each operating system.