Regarding shutdown and say commands

  • I'd like to reopen a old topic because I'm not fully understanding, sorry.



    Yes, that would work. You can either create a plugin which sends the messages and shuts the server down, or alternatively you can just send input commands to the server process (e.g. "shutdown" to shutdown the server, or "say" or "yell" to send a message to all players). In case you create a script to handle the restart, the input commands may be handier (so there is no need to use the plugin API at all) :)

    Firstly, I am not at all concerned about the restarting the server. I have a solution for relaunching after a shutdown.
    Secondly, I know this can be done with API.
    and lastly, yes I know this can be done manually, but I'm asking for purposes of automation, without using the API.


    So, my question is only about rcon and ways to communicate those commands.


    Specifically this part:
    In case you create a script to handle the restart, the input commands may be handier (so there is no need to use the plugin API at all) :)


    So far I can successfully connect via http webrequest on rcon port but I don't know if there are any commands I can send via a hyperlink?


    Example of what I tried http://localhost:rconport/run?command=shutdown


    Alternatively there is the 'rcon.exe application, do these executable rcon applications support any input paramers?


    Example of what I tried start rcon.exe -shutdown


    If there is a way to script commands directly to the server console that works too!


    @red51 sorry to tag you. I've asked many people, but this information has been hard for me to verify, could you elaborate on which methods work or don't please and thanks

  • My DiscordPlugin has integraded shutdown functionality that can be timed to multiple times. The restart must then be done by the OS itself. For my linux its done via systemd service script that restarts always after a shutdown. For windows you need to get it done with task scheduler.


    My server for example restarts 03:30 and 17:00 every day, automatically (if its not in a zombie state due to a mariadb error)

    Gamer aus Leidenschaft
    (Web) Entwickler aus Leidenschaft
    <3 Vater aus Leidenschaft <3
    (prio in aufsteigender Sortierung ;) )


    ~~~~~~~~~~~~~~~~~
    1. Entweder man macht etwas richtig oder lässt es bleiben!
    2. Egal wie lange etwas dauert, Hauptsache es wird fertig (irgendwann)
    ------------------------
    Discord: Devidian#1334

  • Thanks @Devidian for your reply. Sounds like your using API plugin to control the shutdowns.


    As I stated I would prefer to not use the API for simple rcon commands like say and shutdown.


    However, this does appear to be candidate if I do go the API route, so thanks again.


    I still very much would like to know about which other methods might work for sending these commands

  • jeder Server sollte mindestens alle 24 Stunden ein mal neu gestartet werden. Besser wären jedoch alle 8 oder 12 Stunden.
    Um so länger der Server läuft, sammeln sich Daten im chatch und die Leistung minimiert sich. Es wäre schade wenn irgendwelche Bauten wegen keinen Neustart nicht oder fehlerhaft gespeichert wird.


    Nimm es einfach so wie du selber. Ohne Schlaf leidet deine Konzentration und viele andere Funktion bei dir. Hast du gut geschlafen bist du fit für den Tag.

  • Thanks lenko, I am aware of these facts. In fact I've been waiting to find answers to my inquiry for 11 months. Yes, 11 months ago I wrote my reboots script. And released it on github for the community. I've since made it private (for further development). At the time I was actively inquiring this same issue. And I would still really like to know if there are ways to interact with the rcon to complete the cycle, without using any API plugin. I don't think I want my reboots hardcoded into the game. I prefer to be able to run them on demand with let's say Task Scheduler. I don't know if it's a language issue, god knows my language skills are garbage. But the answers have left me with uncertainty? Which is why I've finally asked for developer response. I hope it is not too much to ask.


    Simply put, is there ANY way to script rcon commands that doesn't require API? ?(

  • Sorry for the late response! =O


    So far I can successfully connect via http webrequest on rcon port but I don't know if there are any commands I can send via a hyperlink?

    Well, that doesn't work unfortunately. The rcon tool establishes a socket connection in order to communicate with the server, but it does not listen for commands coming from "outside"


    Alternatively there is the 'rcon.exe application, do these executable rcon applications support any input paramers?

    The rcon tool only accepts the target ip, port and password as input paramters.


    If there is a way to script commands directly to the server console that works too!

    Yes, you can send certain input commands to the server process (to its standard input stream), that's what I was referring to in the other topic. This isn't related to the rcon protocol. Here you find an overview of all input commands the server is listening to: Dedicated Server Setup

  • Ahah a redirect to stdin! Brilliant!


    Sorry I am a total amateur.. I have recently been learning about the standard in, standard out, and standard error, so I think I have an idea of what you're saying. I will play with that and see how it goes. Thanks everyone, especially red51 :thumbsup:

  • The last reply was more than 365 days ago, this thread is most likely obsolete. It is recommended to create a new thread instead.

    • :)
    • ;)
    • :(
    • :P
    • ^^
    • :D
    • :verysad:
    • ;(
    • X(
    • :*
    • :|
    • :crazy:
    • :lol:
    • :dizzy:
    • =O
    • <X
    • ||
    • :thinking:
    • :wacko:
    • :/
    • 8)
    • :wat:
    • :huh:
    • :silenced:
    • :wow:
    • 8|
    • :angry:
    • :thumbdown:
    • :thumbup:
    • :sleeping:
    • :hushed:
    • :nerd:
    • :saint:
    • :drooling:
    • :love:
    • :monocle:
    • :poo:
    • :party:
    • :drunk:
    • <3
    • :!:
    • :?:
    The maximum number of attachments: 10
    Maximum File Size: 1 MB
    Allowed extensions: 7z, avi, bmp, dds, gif, jpeg, jpg, json, log, lua, mp3, mp4, ogg, pdf, permissions, png, properties, rar, txt, xml, zip

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!