From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,bedbbee8b27b663b X-Google-Attributes: gidfee84,public X-Google-Thread: 1020c6,bedbbee8b27b663b X-Google-Attributes: gid1020c6,public From: Javier de Burgos Subject: Re: killing a process by name? Date: 1999/06/09 Message-ID: <375E3103.9B5EEE68@NOSPAMmfom.es>#1/1 X-Deja-AN: 487426128 Content-Transfer-Encoding: 7bit References: <375d6a41.14695581@news.aurora.edu> Organization: Telefonica Transmision de Datos Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1,comp.unix.admin Christopher Kolar wrote: > Foo should run until midnight, when > it needs to be killed so that out nightly backups can happen. > > Problem is that: a) foo has no -kill or similar tag; b) foo does not > drop the process number into a pid file that can be piped into a kill > command. Add to you crontab the following line: 00 0 * * * kill `ps aux | grep foo | tr -s " " | cut -d " " -f2` Easy? Regards -- Un saludo, Javier AKA jdeburgos@NOSPAMcanal21.com AKA 2:341/53.51@fidonet.org