Automatically execute query in MS SQL Studio every hour
Your friend is sqlcmd (Microsoft Technet)


Create a SQL file with the script required to run your cleanup job  
Run the script with sqlcmd.exe and any required parameters  
Create a Windows Scheduled Task and add the command with all the required parameters


E.g.

sqlcmd -d YOUR_DB -E -i YOUR_SCRIPT.SQL -o OUTPUTFILE.TXT 


Good luck.