Previous in Contents Next in Contents

Days Property

This property specifies on which days of the week the project replication occurs.

Syntax

ReplicationSchedule.Days

Remarks

The following days are defined:

CRS_SCHEDULE_DAY_MONDAY 1
CRS_SCHEDULE_DAY_TUESDAY 2
CRS_SCHEDULE_DAY_WEDNESDAY 4
CRS_SCHEDULE_DAY_THURSDAY 8
CRS_SCHEDULE_DAY_FRIDAY 16
CRS_SCHEDULE_DAY_SATURDAY 32
CRS_SCHEDULE_DAY_SUNDAY 64
CRS_SCHEDULE_DAILY 255

You can bitwise OR any combination of these values for any combination of days of the week.

Example

The following example creates a new schedule to replicate project Test on Mondays and Fridays at 3:00 P.M.

Option Explicit 
On Error Resume Next 

const OPEN_EXISTING_PROJECT  = 2
const CRS_SCHEDULE_DAY_MONDAY  = 1
const CRS_SCHEDULE_DAY_FRIDAY  = 16

dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

dim ReplProject
set ReplProject = ReplServer.OpenProject("Test", OPEN_EXISTING_PROJECT)

dim RepSched
set RepSched = ReplProject.AddSchedule
RepSched.Days = CRS_SCHEDULE_DAY_MONDAY and CRS_SCHEDULE_DAY_FRIDAY
RepSched.Hour = 15 

'Release objects
set Sched       = Nothing
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

Hour, Minute, ReplicationProject.AddSchedule, ReplicationProject.EnumSchedules


© 1997-2000 Microsoft Corporation. All rights reserved.