다음을 통해 공유


CReplicationSchedule.Hour Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets or sets the hour for a recurring schedule that is defined for a Commerce Server Staging (CSS) project.

object Hour { set; get; }

Return Value

A whole number between 0 and 23, inclusive. This number represents the hour component of the time of day at which the replication starts.

Remarks

You must have CSS administrator rights to set this property.

The CReplicationSchedule.Hour property corresponds to the COM property named ReplicationSchedule.Hour.

Example

The following example specifies a recurring schedule to replicate the project Test every day at 5:00 AM.

const int Monday = 0x1;
const int Tuesday = 0x2;
const int Wednesday = 0x4;
const int Thursday = 0x8;
const int Friday = 0x10;
const int Saturday = 0x20;
const int Sunday = 0x40;
const int Daily = 0xFF;
CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");
CReplicationProject replicationProject = (CReplicationProject)replicationServer.OpenProject("Test", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);
CReplicationSchedule repSched = (CReplicationSchedule)replicationProject.AddSchedule();
repSched.set_Days(Daily);
repSched.set_Hour(5);
repSched.Commit();

See Also

Other Resources

CReplicationSchedule.Minute Property

CReplicationProject.AddSchedule Method

CReplicationProject.EnumSchedules Method

CReplicationSchedule Class