0

Ubuntu 16.04.5 Headless

So I want the server to start a screen and then start a Minecraft jar file then detach from the screen to keep it running in the background in a way that i can reattach and run commands.

I've tried using crontab "@reboot cd Desktop/goto/path && java blah -java file.jar nogui"

It doesn't seem to be working. I tried looking up scrips and rc.local and its kinda confusing me what it does and when to use it. How can i do this?

  • 3
    Put the command you use for screen (/path/to/screen -dmS {command} in a script in cron. Would be the most obvious method ;) I would suggest to create a systemd service though and not use cron. That way you can also force a "restart on crash". – Rinzwind Sep 4 '18 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.