Notifications

If you want to send notifications to users or groups use the following command.

notifications
  notifications:generate   Generates a notification.

Command Description

sudo -u www-data php occ notifications:generate [-u|--user USER] [-g|--group GROUP] [-l|--link <linktext>] [--] <subject> [<message>]

Arguments:

subject

The notification subject - maximum 255 characters.

message

A more extended message - maximum 4000 characters.

linktext

A link to an HTML page.

Options

-u [USER]
--user=[USER]

User id to whom the notification shall be sent.

-g [GROUP]
--group=[GROUP]

Group id to whom the notification shall be sent.

-l [LINK]
--link=[LINK]

A link associated with the notification.

At least one user or group must be set. A link can be useful for notifications shown in client apps. Example:

sudo -u www-data php occ notifications:generate -g Office "Emergency Alert" "Rebooting in 5min"