I would like to get the server IP address or name when running a scheduled job and return this in the job history. The reason for this is that we have a load balanced environment and would like to know which server in the environment executed the job.
Is this possible?
As far as I know in load-balanced environments only one server should be running the schedule jobs. On all other servers, you should set enableScheduler="false" in applicationSettings in episerver.config.
I believe the scheduler handles multiple servers so there is no need to set enableScheduler to false. Also, if that single server went down then none of the jobs would be run unless you updated the config file.
If anyone is interested I used Environment.MachineName which seems to do the trick
I think Shahid is right. What's the point running scheduler across multiple servers as all your Content Authoring server shares the same database.