Handshake between DXL and Python in batch

Discussions on DXL Code

Handshake between DXL and Python in batch

Postby craig27 » Wed Apr 22, 2009 5:05 am

Hello,
I am using a DXL script to populate DOORS objects based on certain file types found in ClearCase. Once I have populated the DOORS module, the DXL script loops through each module object and parses information out of embedded links within those objects (links to Visio or text files).

This DXL script is in turn calling a Python script and must wait for the Python script to complete before continuing on. To do this, I use the Ack command after the call to Python. The last command of the Python script is to send an Enter key command, which clears the Ack window, allowing DXL to continue.

Now, when all of this is done while logged in, I have no problems. The problem comes when I try to run this overnight in an unattended batch session.

What seems to happen is that Python runs, but the DXL script never gets the Enter key command and it just hangs there waiting.

Let me know if more info is needed, and thanks in advance.
Craig
craig27
 
Posts: 2
Joined: Wed Apr 22, 2009 4:52 am

Re: Handshake between DXL and Python in batch

Postby gatekeeper » Tue Apr 28, 2009 11:04 pm

Hi Craig,

Since it is a batch job do you have the interact with users desktop checked???

that is if you are running this on windows as an AT job
gatekeeper
Site Admin
 
Posts: 3
Joined: Mon Apr 13, 2009 6:47 pm

Re: Handshake between DXL and Python in batch

Postby craig27 » Wed Apr 29, 2009 5:49 am

I'm not familiar with the option you are referring to.
It is running on an XP machine as a scheduled task.
Where would I find the interaction option?

Thanks for the reply
Craig
craig27
 
Posts: 2
Joined: Wed Apr 22, 2009 4:52 am

Re: Handshake between DXL and Python in batch

Postby gatekeeper » Thu May 07, 2009 6:15 am

Sorry Craig,

You may not be able to get it as a scheduled task however you can add it as a AT job.
At the command prompt type AT /?

There looks like there is one stipulation, a user must be logged on

Another way would if you know about how long it takes to parse would be to create a delay or have the DXL create the Python object using the COM interface.

See the AT commands below

C:\>AT /?
The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername Specifies a remote computer. Commands are scheduled on the
local computer if this parameter is omitted.
id Is an identification number assigned to a scheduled
command.
/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.
/yes Used with cancel all jobs command when no further
confirmation is desired.
time Specifies the time when command is to run.
/interactive Allows the job to interact with the desktop of the user
who is logged on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or
month. If date is omitted, the current day of the month
is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the
day (for example, next Thursday). If date is omitted, the
current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.
gatekeeper
Site Admin
 
Posts: 3
Joined: Mon Apr 13, 2009 6:47 pm


Return to DXL



Who is online

Users browsing this forum: No registered users

cron