Problem displaying program output when driven by a cron job
I'm not sure if what I'm trying to do is even possible, but here's the situation:
I have several boxes running Red Hat 7.0. They continuously run a program that generates a substantial amount of screen output - letting us know that the program is running and operating properly. Due to some intermittent problems with this program, we're running in in a debug mode where a log file of everything the program does is generated.
Because the log file rapidly grows to an enormous size, every day the program must be stopped, the log file moved, and then the program restarted. I've been doing this manually, but I'd prefer to automate it.
I've written a series of scripts that take care of the log file cleanup and I want to run them all as cron jobs late at night so service isn't impacted.
The problem I'm having is this: I can use the scripts/cron jobs to run the program in the background just fine, but this means the screen output is not visible. Is there some way of telling cron to open a console window and run the program within that, rather than in the background, when all screen output is either lost or emailed to root?
I can live with running it in the background, but I'd much rather be able to see the screen output as it's occurring.
Any ideas? Thanks in advance.
|