![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to figure out how to cause the JobStep to Error on a condition so i can have it retry later. The JobStep is written in ActiveX, VBScript. The JobStep basically does this: Dim oFso, oFolder, bErr Set bErr = 0 Set oFso = CreateObject("Scripting.FileSystemObject") Set oFolder = oFso.GetFolder("C:\Temp") If oFolder.Files.Count < 10 Then bErr = 1 End If Set oFolder = Nothing Set oFso = Nothing If bErr = 1 Then 'Cause JobStep to Fail End If |
#3
| |||
| |||
|
|
Here you go: If bErr = 1 Then Main = DTSTaskExecResult_Failure End If Walter Main = DTSTaskExecResult_Failure "John Barr" <JohnBarr (AT) discussions (DOT) microsoft.com> wrote in message news 7B25535-2D34-4757-8E3A-3E55A7E49357 (AT) microsoft (DOT) com...I am trying to figure out how to cause the JobStep to Error on a condition so i can have it retry later. The JobStep is written in ActiveX, VBScript. The JobStep basically does this: Dim oFso, oFolder, bErr Set bErr = 0 Set oFso = CreateObject("Scripting.FileSystemObject") Set oFolder = oFso.GetFolder("C:\Temp") If oFolder.Files.Count < 10 Then bErr = 1 End If Set oFolder = Nothing Set oFso = Nothing If bErr = 1 Then 'Cause JobStep to Fail End If |
#4
| |||
| |||
|
|
This is not in a DTS Package, i know how to do that, this is straight from a jobstep with a type of ActiveX Script. "Walter Mallon" wrote: Here you go: If bErr = 1 Then Main = DTSTaskExecResult_Failure End If Walter Main = DTSTaskExecResult_Failure "John Barr" <JohnBarr (AT) discussions (DOT) microsoft.com> wrote in message news 7B25535-2D34-4757-8E3A-3E55A7E49357 (AT) microsoft (DOT) com...I am trying to figure out how to cause the JobStep to Error on a condition so i can have it retry later. The JobStep is written in ActiveX, VBScript. The JobStep basically does this: Dim oFso, oFolder, bErr Set bErr = 0 Set oFso = CreateObject("Scripting.FileSystemObject") Set oFolder = oFso.GetFolder("C:\Temp") If oFolder.Files.Count < 10 Then bErr = 1 End If Set oFolder = Nothing Set oFso = Nothing If bErr = 1 Then 'Cause JobStep to Fail End If |
#5
| |||
| |||
|
|
This is not in a DTS Package, i know how to do that, this is straight from a jobstep with a type of ActiveX Script. "Walter Mallon" wrote: Here you go: If bErr = 1 Then Main = DTSTaskExecResult_Failure End If Walter Main = DTSTaskExecResult_Failure "John Barr" <JohnBarr (AT) discussions (DOT) microsoft.com> wrote in message news 7B25535-2D34-4757-8E3A-3E55A7E49357 (AT) microsoft (DOT) com...I am trying to figure out how to cause the JobStep to Error on a condition so i can have it retry later. The JobStep is written in ActiveX, VBScript. The JobStep basically does this: Dim oFso, oFolder, bErr Set bErr = 0 Set oFso = CreateObject("Scripting.FileSystemObject") Set oFolder = oFso.GetFolder("C:\Temp") If oFolder.Files.Count < 10 Then bErr = 1 End If Set oFolder = Nothing Set oFso = Nothing If bErr = 1 Then 'Cause JobStep to Fail End If |
![]() |
| Thread Tools | |
| Display Modes | |
| |