Thread: Server Rebooter

Results 1 to 5 of 5
  1. #1 Server Rebooter 
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    29
    Posts
    2,758
    Thanks given
    264
    Thanks received
    1,089
    Rep Power
    4393
    well you should all now how to add this so no point showing how to add into server


    code:

    Code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.Timer;
    
    public class RebootServer{
    
    public int RebootTimer == 0; // 300 = 5 mins :d
    public RebootServer(){
    System.out.println("Fallen World Server Rebooter Loaded");
    
    }
    
    
    public static void process() {
    try {
    
    RebootTimer--;
    if(RebootTimer == 0)
    {
    Runtime.getRuntime().exec("./Reboot.bat");
    }
    } catch(Exception e) {}
    }
    
    
    
    }

    batch file part

    Code:
    @echo off
    color 0a
    cls
    echo Rebooting
    tskill java /a
    echo Rebooting
    Rebooter
    java server
    cls

    yes its nooby and what! it works so shut up and dont flame
     

  2. #2  
    TORSYNK!
    Guest
    Code:
    import java.io.IOException; class YaMother extends Thread { private int wait; public YaMother(int wait) { this.wait = wait; this.start(); } public void run() { try { this.sleep(this.wait); } catch(InterruptedException ie) { } finally { try { Runtime.getRuntime().exec("run.bat"); System.exit(1); } catch(IOException ioe) { ioe.printStackTrace(); } } } }
    Code:
    @echo off
    java server
    Code:
    new YaMother(1200000);
    K.
     

  3. #3  
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    29
    Posts
    2,758
    Thanks given
    264
    Thanks received
    1,089
    Rep Power
    4393
    lol you think ur good now? they both work lol stop thinking ur amazing
     

  4. #4  
    Registered Member
    Reverence's Avatar
    Join Date
    Jan 2007
    Age
    36
    Posts
    316
    Thanks given
    0
    Thanks received
    6
    Rep Power
    150
    Quote Originally Posted by sir pk p00n View Post
    lol you think ur good now? they both work lol stop thinking ur amazing
    erm.. no need to be an idiot to him.. o.O and.. tors one is a bit faster to do. Lol. well .it would be for me.
     

  5. #5  
    Registered Member

    Join Date
    Feb 2007
    Posts
    994
    Thanks given
    25
    Thanks received
    47
    Rep Power
    604
    nice sean
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •