Sombero Posted January 8, 2022 Share Posted January 8, 2022 Hello Y'all! I just made a dedicated server through the steamcmd process and I was wondering if there was anyway to schedule a shutdown on the server like to shut down at midnight or maybe even a timer. And just to check is there anyway to make it announce before hand, I assume this takes some programming but I am not sure how to make this ( where to import it in the files). I found that there's some sort of announce command but I'm not even sure how to use that yet. any feedback is appreciated Thank you so much Link to comment Share on other sites More sharing options...
CarlZalph Posted January 8, 2022 Share Posted January 8, 2022 Pipe a "c_shutdown()" into the console of the process to have it save gracefully. You'll need to do it on all shards. To announce things use c_announce("text here"). Link to comment Share on other sites More sharing options...
JazzyGames Posted January 9, 2022 Share Posted January 9, 2022 21 hours ago, CarlZalph said: Pipe a "c_shutdown()" into the console of the process to have it save gracefully. You'll need to do it on all shards. I believe the question was how to automate these processes. Link to comment Share on other sites More sharing options...
CarlZalph Posted January 9, 2022 Share Posted January 9, 2022 2 hours ago, JazzyGames said: I believe the question was how to automate these processes. Any form of automation with servers relies on whatever software/OS the host is running and how much sandboxing requirements are needed. A more generalized pseudo-script would be: 1] Spawn the dedicated server processes for all shards desired on their own forked threads. 2] Spawn a user-input thread to handle user inputs. 3] Check the time periodically or spawn another thread that sets the restart time on timeout to start the restart procedure. 4] During restart procedure, pipe the commands to the processes and issue the commands to the server. Wait for the threads to stop with some timeout in case the server deadlocks and force kill the process if it does. After that it's free to do whatever, either restart the servers again, terminate the script, or have it wait for more user input. It's all very custom-tailored to the specific setup the OP has and desires. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.