How to automatically run a stored procedure on scheduler basis?

sql-server

Solution

You can create a job with the SQL Server Agent.

Right-click on the Jobs folder to open the menu, select New Job:

When you create a new job a window will open and you will provide the details of you job that you want to create. Including:

- Name - in the General tab

- Steps - can run a SQL script, SSIS package, stored procedure

- Schedule - recurring, weekly, daily, etc. at the frequency that you pick.

Here is a Step by Step by Guide to creating a SQL Job

Problem

I want to execute a stored procedure automatically at every night. How can I do it. Please guide me with steps to achieve this target. Thanks in advance.

Original source