Click here to Skip to main content
15,847,653 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wanna schedule a task to windows task scheduler and wanna call a controller method as per datetime of scheduled task.Is it possible? or have another way to do it.

What I have tried:

I have created a task in Task Scheduler and browse the controller path of which have method to execute.When I run the scheduler it's open a Visual Studio with the Controller method.I think, need to create webserive to run a particular method but i need data from database to execute service.
Updated 3-Apr-16 22:02pm
Sinisa Hajnal 4-Apr-16 7:50am    
You need to create the service that does NOT need data to call and in that call access database, get the data you need and then call whatever you need with said data.
itsathere 4-Apr-16 9:16am    
I have created a desktop application and used below code System.Diagnostics.Process.Start("http://localhost:2042/Admin/EmailDatabase/Sendeamil");
to redirect url in browser it will help to reach the method at particular time .It's working after clicking that shortcut of executable file but after scheduling and attachment of the shortcut file not working the same.

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