Shutting down dedicated server on Windows automatically

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
NorDemoniac
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Jan 09, 2017 12:34 pm
Contact:

Shutting down dedicated server on Windows automatically

Post by NorDemoniac »

Hi!
I have a dedicated server running on a Windows 10 machine, which is a 24/7 computer just for these type of things.
I have a problem with Windows 10 deciding to reboot for updates to install, which is fine, I've set active hours so it shouldn't be an issue. What however is an issue is that it doesn't seem to close the batch window correctly, and when it reboots, the save is too old. I do have autosave with 10 saves, so I can easily go back and copy/paste the latest autosave, which would in theory be up to 10 minutes of work lost.

The problem as I see it, is that one of the players is playing without knowing that the server isn't updated, and would "overwrite" the autosaves (when playing for more than 10x10 minutes), and we wouldn't easily be able to avoid that one player loses his work.

Anyways, a solution to the problem is being worked on - I made it so that Windows 10 does not restart for updates as long as the user is logged in, so that solves that, except I would still want Windows to update automatically, I have no problems with a reboot at night, but then I need a way to tell the batch script to close with Ctrl+C.

If I could use Task Scheduler to send "CTRL+C" to the batch process, wait 10 seconds, then reboot the system, it could work.
What do you guys do to avoid this issue?

I could use Linux, as I do have a server for Minecraft which I could without any problems use for Factorio as well. But I thought it was easier to manage Factorio on Windows, due to the ready script. I found some guides on Linux but that involved creating a separate user, setting permissions to a bunch of folders etc. All in all more work than I care for right now. Windows gives me constant backups to JottaCloud, which is a nice feature, and it's simple enough to run a batch script.

Dev: Why doesn't the server autosave to the actual save-file? IMHO it should save to the file it loaded from, and also save after the last player logs out.

Post Reply

Return to “Technical Help”