Automatically shut down the server?

At the moment I am taking it into consideration switching to a Root Server, but the webhost which offers it provides no functionality on how to limit the traffic going to and from the server.
Is it possible to code a script which automatically shuts down the server after a pre-defined amount of in- and out-going traffic? I fear that we might someday exceed the traffic limit (drastically?) and have to pay a lot of money for those extra gigabytes, which I honestly can't afford.

 

 

 

 

Top