0

I have a project - an Issue Management System. Each issue has a status field, which can have several values - new, assigned, started, closed. I would like to track the time from setting an issue to assigned status to say 10 hours later. The problem is that I don't know how to implement this in a web application, since it is only responding to clicks. Should I use a windows service? Or some other solution would be best in this scenario? Any help is greatly appreciated.

5
  • 1
    Setup a timer in the Global.asax file on Application_Start() and preferably use that.. At least that is what I did.. if this is what you would be asking for
    – Nokdu
    Oct 6, 2014 at 6:25
  • "to assigned status to say 10 hours later" - what do you want to happen 10 hours later? Could you just perform the action you want next time the issue is accessed - e.g. set status to "overdue" if status is "assigned" and "TimeStatusChanged" is more than 10 hours ago.
    – Joe
    Oct 6, 2014 at 6:35
  • Yes, I think this is what I was looking for. Thank you! Oct 6, 2014 at 6:35
  • @Joe, I would like to send an email 10 hours later for example. Oct 6, 2014 at 6:38
  • 1
    "I would like to send an email " - One way to do this is to have a scheduled task that periodically - say once every 5 minutes - sends a special HTTP request to the ASP.NET application. On receipt of this request, your app could check for overdue items and send out emails.
    – Joe
    Oct 6, 2014 at 7:40

2 Answers 2

1

I would like to suggest few things which I did in my previous project. If you have only one server and issue tracking is done on single server machine then you can use windows scheduler. I have created small console application and added that application in windows scheduler. set the execution of application in after each 5 minutes. I am using this and working fine. It will reduce the complexity and requires less time and space.

3
  • I agree, except that you don't neccessarily need to add it to the windows scheduler. An extra application is apparently needed, which can be running in the background and do the desired housekeeping periodically but I think the best way to do such a thing is to implement a service. Oct 6, 2014 at 6:27
  • This is a great suggestion. I will try it, however it is not very clear to me how would I connect the console application with the web application, so it will know when a issue's status is changed to assigned? Oct 6, 2014 at 6:31
  • 1
    you need to connect with database not application. Oct 6, 2014 at 6:33
0

I decided to implement this as described in another SO question: 'A better way of doing it is to have a web service that acts as an interface to your ASP.NET application and have a windows service that calls your web service on scheduled intervals' Execute method in global.asax every few minutes Thank you for all your comments and answers. You pointed me in the right direction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.