Share via


ToastNotifier.AddToSchedule(ScheduledToastNotification) Method

Definition

Adds a ScheduledToastNotification for later display by Windows.

Important

This method is only supported in applications which use WinRT as their default application framework.

public:
 virtual void AddToSchedule(ScheduledToastNotification ^ scheduledToast) = AddToSchedule;
void AddToSchedule(ScheduledToastNotification const& scheduledToast);
public void AddToSchedule(ScheduledToastNotification scheduledToast);
function addToSchedule(scheduledToast)
Public Sub AddToSchedule (scheduledToast As ScheduledToastNotification)

Parameters

scheduledToast
ScheduledToastNotification

The scheduled toast notification, which includes its content and timing instructions.

Remarks

This method passes the toast notification to the schedule but doesn't specify the time the toast should display. That information is included in the ScheduledToastNotification.

Be sure to handle these exceptions when calling AddToSchedule:

  • Exception: System.Exception: 'Not enough quota is available to process this command. (Exception from HRESULT: 0x80070718)'
  • Possible cause: You've exceeded the maximum allowed number of scheduled notifications.

Fix: ToastNotifier.addToSchedule will fail if you attempt to schedule more than 4096 notifications. Reduce your number of scheduled notifications.

  • Possible cause: Your notification is scheduled for a time in the past relative to the current system clock time.

Fix: Make sure that the scheduled notification time specified in your ScheduledToastNotification is in the future. Examine the system clock time.

Applies to