Can I send some text to the STDIN of an active process running in a screen session?
- by Richard Gaywood
I have a long-running server process inside a screen session on my Linux server. It's a bit unstable (and sadly not my software so I can't fix that!), so I want to script a nightly restart of the process to help stability. The only way to make it do a graceful shutdown is to go to the screen process, switch to the window it's running in, and enter the string "stop" on its control console.
Are there any smart redirection contortions I can do to make a cronjob send that stop command at a fixed time every day?