Hello,

Someone knows the way to stop a process genetared
by command : EXEC master..xp_cmdshell PsCMD

For example:

I have this code to check pingable:


Set LsIPAddress = '56.87.197.25';
Set PsCMD = 'ping ' + convert(varchar,LsIPAddress) + ' -
t';
Insert into LogPing(Status) EXEC master..xp_cmdshell PsCMD
PRINT 'Process successful!'


But this continue doing it forever which it is ok.
But I just need to run it for 10 seconds and then stop it.

How I can do that? it is possible ?

Any help is greatly appreciated.