I have created a screen, but can I now somehow execute a command that will run commands in the detached screen?
I do not even know if this is possible, but if it is, it will probably be something simple and easy for you.
Thank you for your effort.
Note: The original poster asked 'how can i do this in cron'. I've updated the response to address that.
The above will:
smoser's answer is good though a little complex. You can also just simplify this to just
with the caveat that, when the process exits, the screen will just disappear, and you won't be able to see what it wrote to the screen. That might or might not be ok for your case. You can change that by setting in your
which will mean that screens hang around after their process exits until you press Z.