Program not running during automation
We have a program that is essentially running as a scheduler. Within this program, several others are set to run based on times and dates. I have three programs that are set to run if it is Mon-Thur and Sunday. However, the automation is not running the Sunday request. It works great Mon-Thur. A code was inserted for Fri and Sat to just simply state "SKIPPED" just to verify that this is reading and it is. Several other programs that are ran daily complete without fail. But every Sunday these three programs fail. Currently, they are being manually ran on Monday mornings, and they complete perfectly.
The code was this:
If TimeOfDay < #8:00:00 PM# Then
blnLine0 = True
End If
If TimeOfDay > #8:05:00 PM# And blnLine0 Then
blnLine0 = False
If intDay = 1 Or intDay = 2 Or intDay = 3 Or intDay = 4 Then
i = Shell("L:\RoperDP\RoperVBNet\Line1\ModelLine\Line1 .exe NightBuild", vbNormalFocus)
PopulateListView("Line 0 Sequence Program")
ElseIf intDay = 5 Or intDay = 6 Then
PopulateListView("Day " & intDay & " Line 0 Sequence Program SKIPPED")
ElseIf intDay = 7 Then
i = Shell("L:\RoperDP\RoperVBNet\Line1\ModelLine\Line1 .exe NightBuild", vbNormalFocus)
PopulateListView("Day " & intDay & "SUNDAY Line 0 Sequence Program")
End If
End If
It has been changed to this because of the Sunday issue....
If TimeOfDay < #8:00:00 PM# Then
blnLine0 = True
End If
If TimeOfDay > #8:05:00 PM# And blnLine0 Then
Select Case intDay
Case 1
blnLine0 = False
i = Shell("L:\RoperDP\RoperVBNet\Line1\ModelLine\Line1 .exe NightBuild", vbNormalFocus)
PopulateListView("Day " & intDay & " Line 0 Sequence Program BUILD")
Case 2
blnLine0 = False
i = Shell("L:\RoperDP\RoperVBNet\Line1\ModelLine\Line1 .exe NightBuild", vbNormalFocus)
PopulateListView("Day " & intDay & " Line 0 Sequence Program BUILD")
Case 3
blnLine0 = False
i = Shell("L:\RoperDP\RoperVBNet\Line1\ModelLine\Line1 .exe NightBuild", vbNormalFocus)
PopulateListView("Day " & intDay & " Line 0 Sequence Program BUILD")
Case 4
blnLine0 = False
i = Shell("L:\RoperDP\RoperVBNet\Line1\ModelLine\Line1 .exe NightBuild", vbNormalFocus)
PopulateListView("Day " & intDay & " Line 0 Sequence Program BUILD")
Case 5
blnLine0 = False
PopulateListView("Day " & intDay & " Line 0 Sequence Program SKIPPED")
Case 6
blnLine0 = False
PopulateListView("Day " & intDay & " Line 0 Sequence Program SKIPPED")
Case 7
blnLine0 = False
i = Shell("L:\RoperDP\RoperVBNet\Line1\ModelLine\Line1 .exe NightBuild", vbNormalFocus)
PopulateListView("Day " & intDay & "SUNDAY Line 0 Sequence Program")
End Select
End If
Do you have any other suggestions as to why this would occur?
Krissi
|