Solved! 'kill' in cron

Ron Peterson rpeterson at
Fri Feb 4 17:14:23 EST 2000

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
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at (Subject line is ignored).

More information about the Discuss mailing list