Please reference this thread: http://www.experts-exchange.com/Programming/Languages/Scripting/ASP/Q_28653621.html
I have a series of reports that are ran every morning, around 80 of them. I originally ran these on an Microsoft XP computer, and at the end of report 1 it would do a response.redirect to report 2, then 3, and so on.
I could trigger this from the beginning, or it would run via scheduled task.
I then moved this process to a Server 2012 R2 install, exact same everything.
Now, however, if I trigger the reports, or they run via scheduled task, some random reports will run twice. Here is a log example:
10.3.6.46, -, 9/23/2015, 7:30:23, W3SVC3, CDRWEB, 10.3.1.18, 274, 517, 371, 302, 0, GET, /email_autotelesalesquoten
10.3.6.46, -, 9/23/2015, 7:30:23, W3SVC3, CDRWEB, 10.3.1.18, 233, 517, 371, 302, 0, GET, /email_autotelesalesquoten
If this page truly ran twice, then two separate paths of reports would have followed since the end of the page redirects to the next page. However, what happens is this page will run twice, two emails will be sent, the exact same email, then it redirects once to the next page in the line.
I since then tried, from that first thread above, to change how the reports are called. What I treid this morning is this:
<!-- #include file="/includes/SQLConnection.asp" -->
ssql = "UPDATE MorningReports SET ReportRan = 0"
set rs = Server.CreateObject ("adodb.Recordset")
ssql = "SELECT ReportName FROM MorningReports ORDER BY MorningReportID ASC"
rs.Open ssql, dbc, adOpenForwardOnly, adLockReadOnly
do while not rs.eof
So, although not as many reports duplicated an email, it still happened to 7 of them.
Any ideas on what could possibly be causing this?