Plex HTPC should automatically reconnect after resume from sleep / internet availability

I’ve found a workaround to use task scheduler to kill the task and restart Plex HTPC on resume from sleep; but I wonder if there’s anything better than that like maybe command line control for Plex HTPC?