Scheduled Scrip Fails. Manual Script Works

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
OOsorio
Newbie
Posts: 6
Joined: Thu Nov 14, 2013 8:54 pm
Location: Miami, FL

Scheduled Scrip Fails. Manual Script Works

Post by OOsorio » Thu Nov 14, 2013 9:14 pm

I have created a script to run in a Windows Terminal Server environment. The scheduled script executes the first few lines and never executes the Press Enter.
============================================
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Run>"C:\Program Files (x86)\Activant\Prophet 21 12.1\pxxi.exe"
WaitWindowOpen>Welcome - Epicor Prophet 21
SetFocus>Welcome - Epicor Prophet 21
Wait>1
Press Tab
Press Tab
Press Tab
Press Enter
=============================================
This same scrip works when I run it manually.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1389
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Post by Dorian (MJT support) » Thu Nov 14, 2013 10:04 pm

Hi, OOsorio.

I looked up the ticket we had for this, and wonder if you got my last reply.

You had told me :
The macro executes up to and including the 4th line.
..and I wasn't sure whether you meant including or excluding the comments. That was my last question.

So was the last line that executed this one :

Code: Select all

Run>"C:\Program Files (x86)\Activant\Prophet 21 12.1\pxxi.exe"


Or this one :

Code: Select all

Wait>1
Yes, we have a Custom Scripting Service. Message me or go here

OOsorio
Newbie
Posts: 6
Joined: Thu Nov 14, 2013 8:54 pm
Location: Miami, FL

Post by OOsorio » Thu Nov 14, 2013 10:09 pm

I'm not sure. What I am sure of is that the Press Enter never gets executed.
=================================================
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Run>"C:\Program Files (x86)\Activant\Prophet 21 12.1\pxxi.exe"
WaitWindowOpen>Welcome - Epicor Prophet 21
SetFocus>Welcome - Epicor Prophet 21
Wait>1
Press Tab
Press Tab
Press Tab
Press Enter

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Nov 15, 2013 6:46 am

When does the schedule take place? Is the user logged in at the time and is the session unlocked (not minimised)? If not no press enter is ever going to do anything.

What happens when you schedule for 1 minute from now and watch?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

OOsorio
Newbie
Posts: 6
Joined: Thu Nov 14, 2013 8:54 pm
Location: Miami, FL

Post by OOsorio » Fri Nov 15, 2013 6:18 pm

Marcus,

My Terminal Server session is always connected but it is minimized in my PC Desktop.

I opened the TS screen, not minimized, and the scheduler was able to run a test job I had created.

The actual job is set to run at 7:30 PM so tonight I'll leave my TS session screen open on my PC and see what happens.

Thanks,

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Nov 16, 2013 7:19 am

When a remote desktop/terminal services client is minimized the session is locked. When the session is locked keystrokes cannot be sent and UIs cease to exist. See:
http://www.mjtnet.com/msfaq171.htm
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

OOsorio
Newbie
Posts: 6
Joined: Thu Nov 14, 2013 8:54 pm
Location: Miami, FL

Post by OOsorio » Sat Nov 16, 2013 12:37 pm

The scheduled process worked. I'm very impressed with this software and all its possibilities.

Thank you,

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts