sql job to run every certain time and execute a co

2019-06-06 01:01发布

问题:

I am trying to write a SQL job to run every 10 minutes and to execute a console application that I wrote in C#.

It would be really helpful if someone could help.

回答1:

What you want is a SQL Server Agent Job, with a CmdExec step (which can execute a windows command line). This is explained here: http://msdn.microsoft.com/en-us/library/ms190264.aspx

If security is a concern, it can be secured through the use of a SQL Agent Proxy definition. This is explained here: http://msdn.microsoft.com/en-us/library/ms189064(SQL.105).aspx