The easiest way would be to use SQL Server Agent to schedule your job to run every day at 12AM.
This link should point you in the right direction:
answered Oct 26, 2009 at 03:08 PM
You need to make sure that the SQL Agent service is running on the machine. You can create a job in two ways, and the first leads to the second. Inside SMSS go into SQL Server Agent->Jobs->(right-click)->new jobs
from there you can give your job a name and create any steps from 'Steps' and set the time from 'Schedules'.
the second way to create a job is via script and if you create the job initially via SMSS you can script that job out to a file to see how it is created.
answered Oct 26, 2009 at 03:10 PM