IFsrmFileManagementJob::AddNotification method

[This method is supported for compatibility but it's recommended to use the FSRM WMI Classes to manage FSRM. Please see the MSFT_FSRMFMJNotification::CreateFMJNotification method.]

Adds a new notification value (period) to the file management job's list of notifications.

Syntax


HRESULT AddNotification(
  [inlong days
);

Parameters

days [in]

A unique notification value to add. The value cannot be less than zero.

Return value

The method returns the following return values.

S_OK

Success

E_INVALIDARG

The days parameter is less than zero.

FSRM_E_ALREADY_EXISTS

The job already contains the notification value.

Remarks

The days parameter specifies the number of days before the file is to expire. If the appropriate conditions set in the job are met, notification will be sent to the user to let them know that the file is about to expire. FSRM uses the actions associated with the notification value to determine how the user is notified.

Notification occurs when the job runs and the following conditions are met:

  • Today is the day when notification should occur.
  • The day when notification should occur is before the next scheduled run time.

Note that it is possible for the user to receive duplicate notifications. For example, the user can receive duplicate notifications if the job is run manually after the notification is sent but on or before the day when the notification should occur.

The FromDate determines when the notification window begins. The following properties determine when the file is to expire:

To associate an action with the notification value, call the IFsrmFileManagementJob::CreateNotificationAction method.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2

Header

FsrmReports.h

DLL

SrmSvc.dll

IID

IID_IFsrmFileManagementJob is defined as 0770687e-9f36-4d6f-8778-599d188461c9

See also

IFsrmFileManagementJob
IFsrmFileManagementJob::DeleteNotification
IFsrmFileManagementJob::ModifyNotification
IFsrmFileManagementJob::Notifications
MSFT_FSRMFMJNotification::CreateFMJNotification

 

 

Show: