Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: How to kill a work process within a custom program (batch)

$
0
0

Hi Stefan,

 

We do get all the details of the processes running through the FM 'TH_SYSTEMWIDE_WPINFO'.

 

Based on the conditions we can transfer the details to a file (killproc.bat) on the application server.

 

condition example:

IF WA-WP_TYP = 'DIA' AND WA-WP_STATUS = 'Running' AND WA-WP_ELTIME GT 5000.
       CONCATENATE 'taskkill' '/pid ' wa-wp_pid '/F' into str SEPARATED BY space.

       transfer str to w_dataset1.

ENDIF.


Finally we have to create schedules on the application server to run this file killproc.bat


This file has command taskkill with pid number.


example: taskkill /pid 1836 /F


I do hope you go the idea.


Viewing all articles
Browse latest Browse all 9091

Trending Articles