Auto-restoring last working configuration?

Hi, let’s image we are using two RB’s in bridge mode, we need using the same SSID and know the MAC address of each other R52 radio.
The link is working, then I save the configuration.
If I log on the remote radio and I change SSID or MAC address in the WDS settings, I correctly loose the connection and I must restore the correct settings through serial port or ethernet port.
How can I make a script detecting the lost connection by changing configuration and restore the last working saved one?

Save current working config (/system backup save name=working )
Make a schedule of a /system backup load name=working in 10 minutes.

If it works disable/delete schedule before 10 minutes.

I have not tested it, but it may work.