noesges97 Posted September 21, 2015 Report Share Posted September 21, 2015 Hello.I want to use Crontab to restart my Server. But it dont work and i dont know why. I saw this and tried it for hours. https://github.com/deannreid/BattlEye-RCON-Control-PHP#for-webmin Here is my crontab 0 0,4,6,9,12,15,18,21 * * * cd /home/epoch/server/restarter.pl #restart10,30,50 0-1 * * * php -q /home/epoch/server/Restart/resinf.php #Restart Information0 1,4,7,10,13,16,19,22 * * * php -q /home/epoch/server/Restart/2hr.php #2 Hour Restart Warning0 2,5,8,11,14,17,20,23 * * * php -q /home/dayzservers/epochchernarus/Restart/1hr.php #1 Hour Restart30 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/30min.php #30 Min Restart45 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/15min.php #15 Min Restart50 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/10min.php #10 Min Restart55 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/5min.php #5 Min Restart59 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/1min.php #1 Min Restart The Server dont restarts. I have to activate something that the sheduler run? And i tried to run the php scipts manual with php ./5min.php and it freezes here: Got Socket! Attempting Login Pls help me. Greetings Link to comment Share on other sites More sharing options...
Swordsworn Posted September 22, 2015 Report Share Posted September 22, 2015 0 0,4,8,12,16,20 * * * /home/epoch/serverdownloads/epoch/restarter.plI you use that in me crontab and the server restarts every 4 hours you have a cdin front of the restart, that way youre telling your server to change his current folder to this one but it wont execute anything.remove the cd and you should be fine Link to comment Share on other sites More sharing options...
Zer0HD2 Posted September 24, 2015 Report Share Posted September 24, 2015 (edited) Also note that if you haven't set the path in restarter.pl, then running that command won't work. Just open up restarter.pl, and on line 11 (might be slightly different for you), change it to:use constant PATH => '/home/epoch/server/'; Then, as Swordsworn said, remove the cd from your command. Your current command will try to navigate to restarter.pl as if it were a folder, rather than executing it.EDIT:You should also modify the times at which it will run each PHP file, since a couple don't line up with your restart times. Edited September 24, 2015 by Zer0HD2 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now