Jump to content
noesges97

Need help with Crontab

Recommended Posts

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 #restart
10,30,50 0-1 * * * php -q /home/epoch/server/Restart/resinf.php  #Restart Information
0 1,4,7,10,13,16,19,22 * * * php -q /home/epoch/server/Restart/2hr.php  #2 Hour Restart Warning
0 2,5,8,11,14,17,20,23 * * * php -q /home/dayzservers/epochchernarus/Restart/1hr.php  #1 Hour Restart
30 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/30min.php   #30 Min Restart
45 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/15min.php    #15 Min Restart
50 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/10min.php     #10 Min Restart
55 2,5,8,11,14,17,20,23 * * * php -q /home/epoch/server/Restart/5min.php      #5 Min Restart
59 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

 

Share this post


Link to post
Share on other sites

0 0,4,8,12,16,20 * * * /home/epoch/serverdownloads/epoch/restarter.pl

I you use that in me crontab and the server restarts every 4 hours

 

you have a 

cd

in 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

 

 

 

 

Share this post


Link to post
Share on other sites

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 by Zer0HD2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By FG_Trap
      Made this in my free time awhile ago thought id make it public.
      Right Alt is the key to open the menu.
      Install instructions are inside the download.
      https://github.com/NWDZ-Trapxxgods/traps-menu
       
       
      here is a picture of the server menu
       
    • By lordacus
      so i have been making a server between trying to get my provider to update their mods section. after getting this don i found the server with epoch and infistar were conflicting each other such as: when joining i can use infistar but when i press f9 or i to enter my inventory or f10 for the mobile pad it then conflicts (i think) infistar and i can no longer use it. any ideas on how to stop this
       
    • By vbawol
      Open world survival mod set just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.
      Features
      Powerful persistence framework for Arma 3 with native Windows and Linux dedicated server support. Fully configurable script based security checks. Base Building re-envisioned for Arma 3 PhysX. Persistent secure and insecure storage devices. Upgradeable locking doors. Barter based economy and trading systems backed a single currency ¤ called "Krypto". Hostile Environment with several different types of antagonists, Air and Water temperature extremes, and Earthquakes. Hunting, Fishing, Tame Dogs, Explore & Loot: Wrecked ships, Abandoned vehicles and buildings, Perform task based missions and more! Open source APL-SA Epoch Survival MP gamemode. Open source APL-SA Modders resource configs and Class List. Assets can be used as a mod dependency on Steam workshop.
    • By Achef
      Greetings!
      So I recently started up in a new host and haven't gotten to make the server run, found that a ca/modules bis_fnc issue is recurring but doesn't affect players when running coop missions like the default arma 2 oa ones, but when trying with Epoch hive won't connect/start despite being configured.
      Hive error
      Meanwhile at line 23...
       
      I'm still bad with Pastebin, sorry.
       
      This error has been chasing me for 2 days now
    • By WeepiestLem0n
      So I've been wanting to create a private ArmA 2 DayZ Epoch server for a bunch of my mates to play on, however I dont have a dedicated machine and want to run it on my PC. So I looked at the server download files on the GitHub page and followed the ReadMe, however I absolutely cannot figure out how to get the MySQL server and DB set up. I have downloaded MySQL Server on my PC and created the admin role, root passwords and ran it as a windows service. I now have no clue how to create the database and am wondering if anyone can help me set this up or let me know if I've done anything wrong. 

      I can add on Steam or Discord if need be for convenience.
  • Supporters
  • Discord

×
×
  • Create New...