I have a Trial chamber farm on a private server with my friends. Trial Spawners have a cooldown of 30 Minutes, which is counted as long as the server is up and you need the Bad omen effect (which then turns into Trial Omen) to make the Trial Spawners become ominous, but the duration of that effect is counted only when that specific player is online.
This means in order to maximize the duration of my Omen effect I would have to log off after every use of the farm and log back on after the 30 minutes cooldown has passed. I want to automate this step, so I'm trying to figure out if it's possible to make a script that launches Minecraft, joins a multiplayer server for 1 minute (maybe using the new feature in the launcher), closes the game, waits for 30 minutes, then starts over again. The multiplayer server is (almost) always online.
Additional details from the comments:
I have a private server for just friends but I'm trying to get a stack of every obtainable item in survival, and the heavy core requires a key to open, so I'm attempting to automate farming the keys necessary for it. Normally I would just afk, but you have to have an effect active for the farm to work, and I'm trying to maximize the time I have it since it is only affected by the time I'm online while the trial chamber cooldown is affected by the time the server is up.