Partilhar via


CReplicationSchedule.Commit Method

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

Commits changes that have been made to a Commerce Server Staging (CSS) project schedule.

void Commit()

Remarks

You must have CSS administrator rights to call this method.

Your changes to a schedule will not take effect until you commit them.

The CReplicationSchedule.Commit method corresponds to the COM method named ReplicationSchedule.Commit.

Example

The following example creates a new schedule for a project named MyProject. The schedule sets the replication day and time for the project to Friday at 11:00 PM.

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("MyProject", CSS_PROJECT_CREATION.OPEN_EXISTING_PROJECT);
CReplicationSchedule replicationSchedule = (CReplicationSchedule)replicationProject.AddSchedule();
replicationSchedule.set_Days(Friday);
replicationSchedule.set_Hour(23);
replicationSchedule.set_ScheduledAction(CSS_SCHEDULE_ACTION.CSS_SCHEDULE_REPLICATE);
replicationSchedule.Commit();

See Also

Other Resources

CReplicationProject.AddSchedule Method

CReplicationProject.EnumSchedules Method

CReplicationSchedule Class