Six Stars

How to kill a command initiated using tsystem component

Hi,

I am using tSystem component to run a windows command which is runs for 2 hours normally. I need to check output of that command, if output is wrong i need to kill the job along with command.

 

Even if I kill the job, command will be running in the background. I can see that command process in Task manager.

 

What I want to implement is -- When ever I kill the job, windows command should be killed in Talend job before job terminates.

 

Thanks,

Raghunath.

Raghunath Lingutla
2 REPLIES
Moderator

Re: How to kill a command initiated using tsystem component

Hello,

Would you mind posing your window command in tSystem component here?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: How to kill a command initiated using tsystem component

Hi Sabrina,

Below is my bcp command with context variables and globalMap variables which will be replaced with values at the run time.

 

"bcp ["+context.vDatabaseName+"].[dbo].["+context.vTableName+"] in "+((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))+" -e "+context.vFileSharePath+((String)globalMap.get("tFileList_1_CURRENT_FILE"))+"_Error.txt -c -t "+context.vDelimiter+" -S "+context.vServerName+" -T -h -m 1"

 

Thanks,

Raghunath.

Raghunath Lingutla