Automating Program Start / Stop

Dana J. Laude kc9aae at bresnan.net
Sat May 13 01:20:51 UTC 2006


On Friday 12 May 2006 11:52, Tez wrote:

<snip>
> You could put a simple script in ~/.kde/Autostart
> like:
>
> #Sample Script
> /path/to/app & pid=$!
> sleep 14400
> kill $pid
> $0
>
> That would start & stop a app for you.
> (if my math is right 14400 seconds is 4 hours)

You're close. ;)  I did it this way:

#!/bin/bash
cd /home/username/wdisplay
./GoWeather.sh & pid=$
sleep 14400
kill $pid
$0

We'll see if it restarts in 4 hours,.

Thanks to everyone for their suggestions!

Dana





More information about the kubuntu-users mailing list