views:

106

answers:

1

Hi guys,

I want to build a scheduler, and was thinking of doing it with a scheduler similar to the one once used here on stackoverflow. Currently, in IIS I have two websites pointing to the same application, to represent the same website with two different domains (i.e. www.xyz.com.au and www.xyz.co.nz).

My question is will the scheduler be run twice simultaneouly? The scheduler sends emails based on conditions, against a record. I can log when an email was sent against a specific record. A check in the logs can prevent duplicates, but if the scheduler runs simulataneously, this might fail.

A window service seems the way to go, but I was just curious if any of you guys out there what the answer might be to this scenario

Cheers!

+1  A: 

This completely depends on the way you configure your IIS. If you create 2 seperate websites and application pools in your IIS it will run twice, but if you create only one website and make it listen to two different URL's it will only run once.

It might also be better to use only one of the domains as the "main" domain and make the other redirect to it. This because search engines like google don't like duplicate websites.

And when using only one URL for your site you know for sure users can keep their sessions, sessions/cookies are not shared over different domains.

(I know the last part is a bit off topic, but it is just a tip)

Gertjan