Skip to content

Boot on machine startup

LITEFINE edited this page Jan 28, 2019 · 1 revision

Using crontab

We need to run this command screen -dmS mcb bash -c "cd %MCBOOTSTRAP_FOLDER% && java -Xmx256M -XX:+UseBiasedLocking -jar MCBootstrap.jar" where %MCBOOTSTRAP_FOLDER% is folder where jar file and his folder is stored on machine startup.

So we can use crontab for this:

  • open crontab editor using crontab -e
  • add new line @reboot screen -dmS mcb bash -c "cd %MCBOOTSTRAP_FOLDER% && java -Xmx256M -XX:+UseBiasedLocking -jar MCBootstrap.jar"
  • close editor with ctrl+X, shift+Y and enter
  • check your crontab changes using crontab -l
  • make a reboot and be happy (optional)
Clone this wiki locally