In this article, I am going to use curl tools to hit the MVC endpoint. You can install curl tools from here and browse the location in program files to store.
https://curl.haxx.se/download.html
Why curl?
Curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.
Curl offers a busload of useful tricks like proxy support, user authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer resume, Metalink, and more.
What is SQL Job?
A job is a specified series of actions that SQL Server Agent performs. Use jobs to define an administrative task that can be run one or more times and monitored for success or failure. A job can run on one local server or on multiple remote servers.

Getting Started
First of all, let’s create an MVC endpoint and write some code so we can make sure our endpoint is working. For this sample, I have an endpoint which creates a new text file with some text and date and time.
- public ActionResult CreateTextFileWithDate() {
- WriteToFile(@ "C:\temp", "testsamplefile.txt");
- return View();
- }
- static void WriteToFile(string directory, string name) {
- string filename = String.Format("{0:yyyy-MM-dd}__{1}", DateTime.Now, name);
- string path = Path.Combine(directory, filename);
- using(StreamWriter sw = System.IO.File.CreateText(path)) {
- sw.WriteLine("This text file is created on given date and time: " + DateTime.Now);
- }
- }










Ernest MillerPosted Jul 15, 2019, 2:41 PM
Tricky things u do, thanks!