I need to find a plugin or rig up some command blocks that will run console commands at specific times a day. The most basic need is for the /restart command, but I also have world edit commands I want to run on some schedules too.

I have a spigot server on 1.15.2, command blocks, placeholderAPI with the localtime extension, and the ability to install other plugins of course.

How can I make this happen?


I have my server running inside a screen session. I can then use cron (or anything else, for that matter) to send commands to that screen session.

As an example, here's how i broadcast that i'm about to shut down the server. Adjust the command to your taste

/usr/bin/screen -p 0 -S ftb -X eval 'stuff "say SERVER SHUTTING DOWN. Saving map..."\\015'
  • -p lets you select which window to attach to.
  • -S lets you select a named session to attach to.
  • -X is the command you want to send

look here for more info on the screen command if you need it

Hopefully that'll let you do what you need.

edit:foolishly, i assumed you were using linux...simply because i am.

  • That's a really cool solution! I'm not using linux unfortunately, but I applaud the creativity.
    – Jrud
    Oct 28 '20 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.