Arqade Asked by Jrud on December 30, 2020
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..."