You cant just write the tsql, save it, then execute it. You have to pass the the sql commands to sql server to execute.
This can be done a few ways. A simple batch file that calls sqlcmd (https://msdn.microsoft.com/en-us/library/ms162773.aspx) and passes your sql script would do the trick. Be aware of the plain text login/pw in the batch file.
When you have a batch file you can double click and have it do what you want, schedule that.