开发者

TSQL + ASP MVC - Schedule ASPX or DB_SCHEDULE?

We are developing huge CRM application: MSSQL + ASP MVC. We've created views for password reminder. Every time user want to remind his password application generates GUID. This GUID is deleted when user get his new password. So for sure there are going to be some "lost GUIDs" in the database - GUIDs created for users that will never finish do recover password.

I want to schedule a job or app that will delete those "lost GUIDs". Is it better do accomplish by: 1. setting a job in the database, or by 2. writting another controller and scheduling it ?

In my opinion database job is better solution, because it put data-workflow focused on database, but I prefer to as experts here :).

Which solution will be more scalab开发者_如何转开发le and easyer to deploy over number of clients?


"Better" is subjective and I usually handle different tasks differently.

I have always written these types of tasks as a job. More specifically, the applications that I have built that follow a similar model always have app specific daily/weekly/monthly tasks. For this type of task, I bunch it together with other jobs in a wrapper proc.

I don't manage all jobs this way as, more important things I want to take full advantage of sql agent's notifications and such but general regular data cleanup tasks will log an error and rerun the next cycle, which is acceptable for me.

I hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜