- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Kill process PID using cron
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2005 08:39 PM
тАО03-18-2005 08:39 PM
I need to kill this perl process at a predefine time using cron.
I am able to find PID using
ps -ef | grep perl | awk '{ print $2 ; } '
how to use this value , to kill process.
What will be the correct syntax of script.
Abhijeet
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2005 08:57 PM
тАО03-18-2005 08:57 PM
Re: Kill process PID using cron
| xargs kill -9
"xrags" command takes all the stdin and sends it as arguments to the command, in this case "kill -9".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2005 05:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2005 10:23 PM
тАО03-19-2005 10:23 PM
Re: Kill process PID using cron
is better to create e file called killperlpid.sh which will be executed to Kill the process you need.
#cat killperlpid.sh
!/usr/bin/sh
kill -9 `ps -ef | grep perl | awk '{print $2}'`
Put it in crontab like below:
you can choose how ofeten do you want to run the script.
For example if you want it to be excecuted every 10 minutes.
00 10 20 30 40 50 * * * * /killperlpid.sh 2>&1
*****
1-st star is for minutes *=every min
2-nd star is for hours *=every hour
3-rd star is for days *=every day or specific day 0,1,2,3,4,5,6 From Sunday - Saturday
4-th star is for month *=every month or specific month 1,2, ... , 12
5-th star is for year *=every year or for specific
Taulant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2005 03:17 PM
тАО03-20-2005 03:17 PM