This read-only property returns whether the RunOnce property is set.
Syntax
ReplicationSchedule.IsRunOnce
Example
The following example displays whether the RunOnce property is set.
Option Explicit
On Error Resume Next
const OPEN_EXISTING_PROJECT = 2
const CRS_ERROR_NO_MORE_ITEMS = 0&80003B17
dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
dim ReplProject
set ReplProject = ReplServer.OpenProject("MyProject", _
OPEN_EXISTING_PROJECT)
dim RepSched
On Error Resume Next
do while True
Err.Clear
set RepSched = ReplProject.EnumSchedules
if IsEmpty(RepSched) then exit do
if RepSched = CRS_ERROR_NO_MORE_ITEMS then exit do
dim OneTime
OneTime = RepSched.IsRunOnce
if OneTime = True then
Wscript.Echo "MyProject is scheduled to run once."
else
Wscript.Echo "MyProject is scheduled to run more than once."
end if
loop
'Release objects
set Sched = Nothing
set ReplProject = Nothing
set ReplServer = Nothing
See Also
RunOnce, ReplicationProject.AddSchedule, ReplicationProject.EnumSchedules