In SQL Server, you should use JOBS to run a stored procedure based on schedule.
- Open SQL Server Management Studio.
- Expand SQL Serve Agent.
- Right-click on jobs and select a new job.
- Provide a name for the job and description.
- Click on the steps option> click new.
- Write the name of the step.
- Select the type of step.
- Select the database that has the stored procedure.
- Write the below command to execute a stored procedure.
Exec Stored_procedure_Name
- Click Ok.
- Again, click on Schedule and click the new button
- Add the name of the schedule.
- Specify the time of starting job and start date as you prefer and then click ok