You could get the source code from GitHub and modify it. Basically you erase what I have and would put whatever you want to happen within the “send_ping” function:
def send_ping(self):
[your stuff]
But that’s running within weewx, so it won’t do much good if weewx itself crashes. You’d have to set Healthchecks or something similar to run the script itself, or notify your server to run the script. I’m not sure how you’d do that.