Ahtenus / minecraft-init

Init script for minecraft and bukkit servers
404 stars 125 forks source link

How to use this script to restart minecraft once a day? #143

Open maxim27 opened 11 years ago

maxim27 commented 11 years ago

Hi, i just want to make sure that i did not do something that is not necessary. Does the script in its default configuration (the given contab settings in the setup tutorial) do minecraft server restarts? i want to automaticaly restart my minecraft server (just the program not the whole server) at least once a day, idealy every 6 hours or so. Is it ok to put the following line into the crontab or is it not necessary or wrong? 00 6,12,18,24 * * * /etc/init.d/minecraft restart

Leopere commented 11 years ago

probably but if you followed the guide you could replace the filepath with the service name. in this case it would be "service minecraft restart"