Does anyone know of a way to add a start and stop time of an action that is created by the api?? Here is the xml i’m using to create an action:
`<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd"><SourcedFixletAction>
<SourceFixlet>
<Sitename>ActionSite</Sitename>
<FixletID>12233454</FixletID>
<Action>Action1</Action>
</SourceFixlet>
<Target>
<ComputerName>computer123</ComputerName>
</Target></SourcedFixletAction></BES>`
Doesn’t really offer a lot of help by itself so any help anyone can offer would be great.
thanks!
Raul
The actual schema here is:
<xs:complexType name="SourcedFixletAction">
<xs:sequence>
<xs:element name="SourceFixlet" type="BESActionSourceFixlet" />
<xs:element name="Target" type="BESActionTarget" minOccurs="0" />
<xs:element name="Parameter" type="BESActionParameter" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="SecureParameter" type="BESActionParameter" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="Settings" type="ActionSettings" minOccurs="0" />
<xs:element name="IsUrgent" type="xs:boolean" minOccurs="0" />
<xs:element name="Title" type="ObjectName" minOccurs="0" />
</xs:sequence>
<xs:attribute name="SkipUI" type="xs:boolean"/>
</xs:complexType>
So you should be able to specify Settings:
<Settings>
<PreActionShowUI>false</PreActionShowUI>
<HasRunningMessage>false</HasRunningMessage>
<HasTimeRange>false</HasTimeRange>
<HasStartTime>false</HasStartTime>
<HasEndTime>true</HasEndTime>
<EndDateTimeLocalOffset>P2D</EndDateTimeLocalOffset>
<HasDayOfWeekConstraint>false</HasDayOfWeekConstraint>
<UseUTCTime>false</UseUTCTime>
<ActiveUserRequirement>NoRequirement</ActiveUserRequirement>
<ActiveUserType>AllUsers</ActiveUserType>
<HasWhose>false</HasWhose>
<PreActionCacheDownload>false</PreActionCacheDownload>
<Reapply>false</Reapply>
<HasReapplyLimit>true</HasReapplyLimit>
<ReapplyLimit>3</ReapplyLimit>
<HasReapplyInterval>false</HasReapplyInterval>
<HasRetry>false</HasRetry>
<HasTemporalDistribution>false</HasTemporalDistribution>
<ContinueOnErrors>true</ContinueOnErrors>
<PostActionBehavior Behavior="Nothing"></PostActionBehavior>
<IsOffer>false</IsOffer>
</Settings>
Taking note specifically of:
<HasEndTime>true</HasEndTime>
<EndDateTimeLocalOffset>P2D</EndDateTimeLocalOffset>
Which means the action has an end time and it’s 2 days away (specified in ISO 8601 duration format)
1 Like
@strawgate I can’t thank you enough, this is great stuff. Very much appreciated!