Dear All
Is there some automatic way of terminating a program at a previously specified time?
Thanks in advance,
Paul
On Monday 31 October 2005 7:37 pm, Paul Smith wrote:
Is there some automatic way of terminating a program at a previously specified time?
You can use the "at" command if it's going to be for something specific (not periodically):
Try:
at 4:10pm <ENTER> kill -15 `pidof myProcessName` <ENTER> <CTRL-D>
You can specify as many commands you want after the "at" invocation and end it with a end-of-line (here invoked with CTRL-D). There are many ways to invoke the "at" command. Read the man page or google for it.
HTH, Jorge
On Mon, 2005-10-31 at 23:37 +0000, Paul Smith wrote:
Dear All
Is there some automatic way of terminating a program at a previously specified time?
You can use "at" to schedule a job to run at some point in time. And you can use "/usr/bin/killall some-process-name" to kill it. So,
echo "/usr/bin/killall fred" >/tmp/killfred at -f /tmp/killfred 14:30
should do it.
---------------------------------------------------------------------- - Rick Stevens, Senior Systems Engineer rstevens@vitalstream.com - - VitalStream, Inc. http://www.vitalstream.com - - - - Lottery: A tax on people who are bad at math. - ----------------------------------------------------------------------
On Mon, 2005-10-31 at 23:37 +0000, Paul Smith wrote:
Dear All
Is there some automatic way of terminating a program at a previously specified time?
Thanks in advance,
Paul
http://linuxweblog.com/node/148
Best Regards, Keith
On 11/1/05, Keith ac7xc1nx@comcast.net wrote:
Is there some automatic way of terminating a program at a previously specified time?
Thanks to all for your very helpful answers.
Paul