Jump to content

How to schedule a shutdown for a dedicated steam server.


Recommended Posts

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 :wilson_love:

 

Link to comment
Share on other sites

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

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.

×
  • Create New...