May 28, 2015 07:52 by
Peter
Here during this example I'll show you the way to execute a task or call a store procedure at a specific time(like at midnight) using SQL Server or I will say the way to schedule a job at a specific time. Sometimes you have got to perform something daily, weekly or at a selected gap of your time. Repeat a similar task when by a person is little bit difficult. So, in this case SQL is here to solve your problem using SQL Job scheduler. This is often a task you fixed in your server, set timer on at particular time and write down the SQL query to perform. That is all you have got to do. Let’s see the way to schedule your Job at a selected time.
Open your Management Studio and check the SQL Server Agent. Begin the SQL Server Agent by following steps.
Next step, go to Job section in your SQL Server Agent and select New Job, shown on the below picture:
After choosing the New Job, a new window will be opened with all the properties of a New Job. Now it’s time to fill up each and every field according to your specification. In the General tabs write down any name according to your project and left the others as it is.
Now, in the “Steps”, click on the New button, and a new window will be opened as shown on the following picture:
Write a name for your step and your query to be executed and select on the OK button.
Now, in the Schedule tab follow the steps as the following image:
The only thing is left is to start your job. To start the job follow this steps.
After successfully starting of the job you will get a successful alert message shown on the following picture:
HostForLIFE.eu SQL Server 2014 with Free ASP.NET Hosting
Try our SQL Server 2014 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc.