Click here to Skip to main content
15,867,921 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Stored procedure to send email, and i want this Stored Procedure to be executed daily and automatically in specific time let's say 8:00 AM, i'm using SQL Server 2016, any solution is appreciated.

Thank you,,

What I have tried:

I created scheduled job but the job is not running at all.
Posted
Updated 18-Apr-20 19:49pm
v2
Comments
MadMyche 18-Apr-20 17:48pm    
How did you create this "scheduled job"? Was this in Windows Task Scheduler?
ABAKh 18-Apr-20 17:51pm    
I created it from SQL Server under SQL Server Agent.
MadMyche 18-Apr-20 19:08pm    
Good. What does the Job History show for the execution?

1 solution

As you have SQL Server Agent (not available in Express) you can do it like shown in the examples here:
Schedule a Job - SQL Server Agent | Microsoft Docs[^]
Scheduling SQL Server Jobs with SQL Agent - SolarWinds[^]
 
Share this answer
 
v2
Comments
ABAKh 20-Apr-20 15:51pm    
I already created job with SQL Agent as it is in the second link that you sent, my question is: Is it possible with SQL Agent to create a job that can execute stored procedure daily on specific time, or if it is not, how to execute stored procedure daily on specific time with MS SQL Server, any answer or suggestion is appreciated. Thanks a lot.
Richard Deeming 21-Apr-20 11:33am    
That's exactly what SQL Agent does.

If you've set up a recurring schedule for your job and it's not running, then you need to check that the SQL Agent service is started, and make sure its startup type is set to "Automatic" instead of "Manual". Then check the execution history of the job for any errors.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900