Answer the question
In order to leave comments, you need to log in
How to create a screen and run a script in it via CRON?
It is necessary to do the following chain of actions on cron (if you do it manually):
1. Create a screen: screen -S TestScreen
2. Run the script in it (if you create a screen through the terminal, after creation it will automatically transfer us to it) php MyPhpDaemon.php
3. Exit the screen, leaving it to work: Ctrl+A, D
How can this be written in one command in cron? Linux commands are not strong.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question