Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9171165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:07:33+00:00 2026-06-17T16:07:33+00:00

I have a Minecraft Bukkit Server which I run on my mac. I also

  • 0

I have a Minecraft Bukkit Server which I run on my mac. I also travel often, making server restarts a pain. Is it at all possible for me to have a Python 2.7.3 script which can close the server using the stop command. I would then like the script to wait 30 seconds and then reopen the server. I would like the script to also be on a timer which restarts the server every 6 hours.

My main question is, are there any modules, libraries, or ways for me to accomplish this and where can I find more information if necessary?

print "Hello - This is the Bukkit Restart Program!"
"\n"
print "It will restart the minecraft server every 6 hours"

—- Pseudo Code —-

def RESTART():
    OUTCOME = None
    Every 6 hours:
        if program can open start_server.command:
            print "stop" in start_server.command
            wait 30 seconds
            open start_server.command
            OUTCOME = 1
        else:
             print "Error encountered!!"
             OUTCOME = 0
    return OUTCOME


def check():
    log = open("log.txt", "a+")
    if OUTCOME = 1:
        log.write("\n <insert time> SUCCESS!")
    else:
        log.write("\n <insert time> FAILURE! PLEASE CHECK CODE!")
    log.close()
RESTART()
check()

Sorry if my question is too naive, but I am an amateur programmer!

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:07:34+00:00Added an answer on June 17, 2026 at 4:07 pm

    A good tool to use for this job would be cron. It comes installed on Mac, and is specifically designed for running tasks at specific intervals.

    I would make a python script that runs your command (look into the subprocess module) and does whatever error checking you want, and then set it as a cron job.

    The basic procedure to set up a cron job is something like this:

    # (in a terminal)
    # This opens up your crontab file, which lists all your scheduled jobs
    crontab -e
    

    Then add a couple lines like:

    0 0 * * *  python /path/to/your/script.py
    0 12 * * * python /path/to/your/script.py
    

    That will run your script once at midnight and once at noon each day.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a domain which is being used as my Minecraft Server. I'm using
I have a small Minecraft server where people can upload their skins. Minecraft skins
I am making (another) MineCraft clone, and I've run into an interesting problem. I
Basically I run a minecraft server on a Centos 6.2 16GB system I boot
I'm making a command interface for a node server, but I have reached a
I am writing a plugin for the popular Minecraft server software, Bukkit. My plugin
In my properties file that I have for a mod I'm making for Minecraft
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have deployed numerous report parts which reference the same view however one of them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.