We have created a scheduled Job and it runs every day at 6 am . We have faced some issues with it as sometimes two instances of the same job runs at the same time .
The Job runs at 6 am in the morning and is used to read xml files at a particular location and once the processing is completed then to delete it . So, on one particular day the job started at 6 am and another instance of the same job started after 20 or 30 minutes . So, every processesing was done twice for every file . The next scheduled date is set to next day auto matically once the job starts at 6 am so this san't be the issue.
Is there any fix or patch for this and if there ain't then is there any suggestion on how to fix this .
Episerver CMS version : 7.0.589.1
Do you have two or more web servers? Or is this a single-server-environment?
We have only Single-Server environment
you will probably require to review your code also, Are you using threading in our code?
We have single server application and we are not using any threading in our code .
Can you check the IIS log to make sure the site has not restarted when this has happened? If a scheduled task is running when the site restarts, it will automatically restart the scheduled task as well.
Is the error handling correct? Could there be certain errors are caugth in the wrong place causing a wrong code-flow?
You say that the same job starts after 20 or 30 minutes. Are there any patterns, or is it totally random when it starts?
This has happened totally randomly . In about 6 months it has occured twice and this job runs every day
Have you turned on "web garden" on the application pool? This effectively runs the site in several app domains (like having a load balanced solution on one server). This is not recommended.
We have only one Worker process running at a time .