Is it possible to start a screen session, set up an cronjob, and redirect the cronjob's output to the screen session? Would be great to follow the programm's output ;-)
Greetings....
|
feedback
|
|
You could use the Like this: 1 2 3 4 5 myapp &> /dev/pts/14 | |||
|
feedback
|
|
as radius mentioned, there's no sure way of knowing which tty or ttys your screen session will be using at any given moment....or even which of the many pseudo-ttys that might be open in screen is the one that you actually want the output sent to. your best bet is to redirect the cron job's output (both stdout & stderr) to a file, and then run 'tail -f' or 'tail -F' on it from within screen. that gives you a permanent logfile as well as the ability to watch it in real-time. alternatively, don't redirect the output at all and just wait for the job to finish - all output will then be mailed to the job's owner. | |||
|
feedback
|
|
grawity give a good way to do that but the problem is that each time you restart screen/server the tty will change. | |||
|
feedback
|
|
Why not just start screen in the cronjob, then start whatever it is you want to run inside that? | |||
|
feedback
|