I have an MVC app. I have a controller that when called runs a background process to query Active Directory and updates the database.
http://myapp/BackgroundTask/Run
I want to run this on a schedule (daily) without opening a browser. I see that there's a lot of third party solutions, is there something built in?
Use the Invoke-WebRequest cmdlet from Powershell.
In your task:
Start a program
powershell.exe
-Command "Invoke-WebRequest http://myapp/BackgroundTask/Run"
Alternatively, you can use
cmd.exe
as follows:Start a program
cmd.exe
/c start "" http://myapp/BackgroundTask/Run &