I'm new to batch files, but if I told PlayFab to execute one when a server spins up, would it be able to?
If not, do you recommend any ways about how I can handle this?
I'm new to batch files, but if I told PlayFab to execute one when a server spins up, would it be able to?
If not, do you recommend any ways about how I can handle this?
There is no facility in PlayFab for running a batch file. Depending on what it is you're trying to do, you have a few options:
1. Since you mention "when a server spins up", I'm guessing you mean you'll be running dedicated servers (custom game servers) as part of your game . If so, you would simply use the Server API to make calls from the server to PlayFab, for the info you need.
2. You can run Cloud Script handlers via a Client or Server API call, or trigger them via a Rule in PlayStream, to execute lightweight server-authoritative logic that runs in your title.
3. You could set up Scheduled Task that runs some specific logic (also potentially a Cloud Script) either manually or on a regularly scheduled basis (hourly, daily, etc.).
Ah, I think my question was to vague.
I am talking about Custom game servers, but specifically instead of setting my path to gameserver.exe(or whatever it actually is), can I set it to serverlauncher.bat(again, just an example)?
So instead of running an exe I want to run a .bat.
Sorry, no - it needs to be an executable. Also, one thing to be aware of is that as soon as the executable we launch exits, that's when our service which manages the servers knows that your server has stopped running, and the instance can be cleaned up. So if you have an exe that launches a different one, you need to make sure that first one doesn't exit until the one the game instance is completely finished.
2 People are following this question.