Run command after each update

I would like to send a command to another server after the update went through.
is this possible (run command after each update).

Mastodon