Jaa


CReplicationSchedule.ScheduledAction Property

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

Gets or sets a value that indicates whether the schedule will initiate a replication for a Commerce Server Staging (CSS) project, or will issue a CSS Apply Command for timed release of Web content projects.

object ScheduledAction { set; get; }

Return Value

One of the two numeric values that are shown in the following table.

Action

Value

Description

CSS_SCHEDULE_APPLY

1

Apply changes but do not replicate content. The content is replicated from the source staging server according to the schedule's replication time. However, the content becomes available on the destination server when the schedule's apply time occurs.

Bb498319.alert_note(en-US,CS.70).gifNote:
This action is valid only for schedules that are defined for Web content projects. For more information about timed release replications, see How to Initiate Timed Release of a Web Content Project.

CSS_SCHEDULE_REPLICATE

2

Replicate content. The content is replicated when specified by the schedule. Available schedules include daily, weekly, or one time only.

Remarks

You must have CSS administrator rights to set this property.

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

Example

The following example specifies that content replicated for the project named Test is to be applied on Saturdays at 8:30AM.

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(Saturday);
repSched.set_Hour(8);
repSched.set_Minute(30);
repSched.set_ScheduledAction(CSS_SCHEDULE_ACTION.CSS_SCHEDULE_APPLY);
repSched.Commit();

See Also

Other Resources

CReplicationProject.AddSchedule Method

CReplicationProject.EnumSchedules Method

CReplicationSchedule Class