Skip to content
Advertisement

Run “screen -S name ./script” command on @reboot using crontab

I’ve tried adding this to my crontab:

@reboot /root/startup

The “startup” file:

JavaScript

Now svnserve commands run fine. The problem is with the screen command.

log1 and log2 files have the same content which is: Must be connected to a terminal.

What I’m trying to do is start the 2 executables on startup, and then later have a way to access them.

Is there a way to do this?

Advertisement

Answer

You want to add the following options to the ‘screen’ commands (e.g. before -S): -d -m From the manpage:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement