Running a stored procedure from Windows Task Scheduler
Posted by Anders Vindberg
in Lunarmedia Blog
on the 04 Feb. 2008 (7,804 views).
Rightclick in the Scheduled Tasks area and choose "New" -> "Scheduled Task". Then in the run field add the following:
sqlcmd -S .\SQLExpress -i c:\expressmaint.sql
In the sql file you can simply write: EXEC dbname.dbo.sp_AnyStoredProcedure.
Why don't just use SqlAgent you may ask. In SqlExpress the SqlAgent has been feature cut - because express is free.