views:

33

answers:

1

i have a hosted web site and i have an asp.net mvc site. The hosting company allows you to setup "scheduled tasks" which are basically just using the windows scheduler. The service checks a URL at whatever interval that you want but all you can supply it is a URL.

i want to have a job that runs a db query and emails out to me the results of a certain table.

My questions is how do i have just a URL that can go and run code to email out as i obviously dont need any html returned to a view in this case as its just running a task.

+1  A: 

Create a controller with a method that will query the database and send you an email and map it to some route. And use the url you mapped to as an url to check. And all should work.
Or may be I just don't understand your question. In this case please update the questions with some details.

zihotki
what should the controller action return ? i guess if it emails out in the action i dont really need it to return anything. can i just make it void ?
ooo
By all means make it void.
DM
@oo, just return some empty result and it will be OK.
zihotki