H
H
HellWalk2018-05-18 17:21:36
linux
HellWalk, 2018-05-18 17:21:36

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

1 answer(s)
F
Fixid, 2018-05-18
@Fixid

In general, add to crontab
but first check with your hands in the console

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question