What’s the best way to keep awake a network disk

I’m looking for the best way to keep awake the connexion between a PC and a network disk.

A webite is hosted on the network disk and during the night, the connection between those two “died” and a “error 403 forbidden access” appearing. A simple manual refresh of the webpage is enought to make it works again.

What’s the best way to counter that?

  • a exchange of file every x minutes?

  • an extension which detect the “error 403” screen a make a hard refresh everytime it’s appearing?

  • just a script with a ping xxx:xxx:xxx:xxx all day long?

  • something else I don’t even think about?