Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Solved! 'kill' in cron



I'm not going to tell you how much time I spent on this, because it
would be extremely embarrasing.

Here's the problem summary: I had a little bash script to kill a program
called 'backfract', that draws a fractal background every so often.  I
wanted to restart the program every once in a while, because it
eventually zooms way in and takes forever to redraw.  Plus each time it
starts you get pretty new colors!!!

My script worked fine when I ran it from a terminal window.  But when I
called it from cron, it never worked.

My approach to solving the problem was, unfortunately, not very
scientific.  I guess I just didn't think it would be that hard a nut to
crack, so I just kept changing things around.  Somehow, I never got the
right combination of things in place at the same time.  Arrrggh.

Anyway, the key was to put DISPLAY=:0 in my crontab file.  Without that,
the script would stop.  I had tried that at one point, but I must have
had something else screwed up at the same time.

The moral of the story is that genetic recombinatorics might be good for
evolution, but it's not so good for pinpointing a bug.

Thanks for helping.

Ron Peterson
rpeterson at yellowbank.com
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org