Sunday, October 3, 2010

Steps To Kill Backgound Process In Unix/Linux)

The background on this:

One of our operation was running a application hosted in Unix and some cron jobs had been scheduled to run periodically, to produce an output file and stored in a fixed directory for some business purposes.

But sometime, operation has to some settings and in order to reflect the new setting, the cron job has to be kill and relaunch. There's no GUI interface for this and operation has to log a ticket to the helpdesk to get it done. But every helpdesk ticket that raise, there's a ticket cost and operation has to pay, in regardless whether it has been resolve at the agree period.

This is what I had came with for that operation, for them to DIY, to kill the scheduled job before relaunch it to reflect the new setting. It should works on  Linux as well.


These are the processes that required.

Process that required to kill a task in unix.

Step one: List the process and get the process ID

ps -ef|grep <username>

Step two: kill the process

kill <Process ID>


It is that simple!.

Permanent Link