Skip to main content

Scheduled Messages

Compatibility
This feature compatible with Better Messages 3.3.1 or higher

A member writes a message now and chooses when it is sent: tomorrow morning, on Monday, or at any date and time within a year. Until then only they see it. At its time it is sent as if they pressed Send, so it notifies, counts as unread and reaches every member as any other message.

It is useful for reminders, announcements to a group or a chat room, and replies that should arrive in working hours. Scheduled messages are in both the free version and the WebSocket version, and are off until an administrator turns them on.

The Messages page as Alex Novak with the Design Team conversation open. Beside the buttons of the reply area a clock carries the count 2, and in the list Design Team and Product Launch show a small clock beside their time. The scheduled messages are not in the conversation itself

Scheduling a message#

  1. Write the message in a conversation, with formatting, mentions, files or as a reply to a message.
  2. Open the menu of the Send button: a right click on a computer, a long press on a phone or tablet. Or open the + attachment menu.
  3. Pick Schedule message.
The Design Team conversation with Can we move the retro to Friday afternoon? written in the reply area, kept as a draft in the list, and the menu of the Send button open above it with one item, Schedule message, with a clock

The dialog offers Later today, Tomorrow morning and Monday morning, each with its time, or a date and a time of their own. The times are in the time zone of the device of the member, which the dialog names under them. The time must be at least a minute ahead and within a year.

The Schedule message dialog over the messenger: Later today at 6:00 AM, Tomorrow morning at 9:00 AM and Monday morning, Mon, Nov 23 at 9:00 AM, then the Date and Time fields, Today at 4:35 AM with the time zone America/New_York under them, and Cancel and Schedule

The reply area empties. A clock beside its buttons counts the scheduled messages of the member in that conversation, and the conversation shows a small clock beside its time in the list of conversations.

What can be scheduled#

MessageHow to schedule it
Text, with formatting, mentions and a replyThe menu of Send, or Schedule message in the + menu
Files and picturesAdd them as usual, then schedule the message. They upload now and wait with it
A locationPick the place with Share location in the + menu, then schedule the message as above
A pollPoll in the + menu, then Send later above the buttons of the dialog, a time, and Create poll
A voice messageRecord it, then open the menu of Send in the recorder and pick Schedule message
A video messageRecord it, then open the menu of Send video message and pick Schedule message

A scheduled poll stays open as long after it is sent as was chosen in the dialog: a poll set to end in one day ends one day after it goes out, not one day after it was written. Polls, voice messages and video messages need their features to be on and allowed for the role of the member, and they are checked again when the message is sent.

The New poll dialog over the messenger: the question Where should the team lunch be on Friday?, the options Pizza on Main Street, Sushi bar and Taco truck, the switches of the poll and Ends: Never, then above Cancel and Create poll a line with a clock, Scheduled, Tomorrow at 9:00 AM, Change and a button to send it now

Managing scheduled messages#

The clock opens the list of scheduled messages of the conversation. Each one shows when it is sent and the message exactly as it will stand in the conversation, drawn the same way as the messages of the conversation: files, pictures, link previews, replies, polls, places and players. It has four actions:

ActionWhat it does
EditPuts the message back in the reply area. Change it and press Send to save, or close the Edit scheduled message bar over the reply area to leave it as it was. Polls, voice messages and video messages have no Edit, only their time can be changed
RescheduleChooses another time
Send nowSends it at once
DeleteDeletes it after a confirmation. It is never sent
The Scheduled messages dialog of the Design Team conversation with two messages, each drawn as the conversation draws it, under the name Alex Novak with the time it is sent: a reminder of the design review for Tomorrow at 9:00 AM, and for Mon, Nov 23 at 9:00 AM the file review-agenda.pdf of 236 KB, a picture of design boards on a desk and the text The boards and the agenda for Monday, have a look before we start. Each has Edit, Reschedule, Send now and Delete, and the link All scheduled messages is under them

A poll shows its question and options with how long after it is sent it ends, a voice or video message its player, and a location its map. Nothing in the list can be voted on or replied to before the message is sent.

The Scheduled messages dialog of the Design Team conversation: for Tomorrow at 9:00 AM the poll Where should the team lunch be on Friday? with its three options, No votes yet and Ends 1 day after it is sent, for Tomorrow at 12:00 PM the map of Lower Manhattan with the pin of Coffee Lab, 12 Market Street with Open and the text Meet you here after the review, and for Mon, Nov 23 at 9:00 AM a voice message of 00:14 with its player. Only the place offers Edit

All scheduled messages, under the list and in the menu of the name of the member at the bottom of the messenger, lists every scheduled message the member has, grouped by conversation, with the same actions and a link to each conversation.

The All scheduled messages dialog grouped by conversation: Maya Chen, whose message Thanks for the quick review, Maya! reads Not sent with the reason You are no longer a member of this conversation, Design Team with its two messages, each drawn as in the conversation, the second with the PDF and the picture

When a message cannot be sent#

A scheduled message goes through every check a message sent by hand goes through, at the time it is sent. If the member can no longer send it, it is not sent and stays in their lists as Not sent, with the reason:

  • They are no longer a member of the conversation, or were removed from the chat room
  • They can no longer send messages there: they were blocked or banned, or the conversation was closed to replies
  • The conversation was deleted
  • Their role may no longer schedule messages
  • The site could not send it within a day of its time, for example because its scheduled tasks did not run

The other members never see a message that was not sent. The member can edit it, reschedule it, send it now or delete it. A message held back by the reply rate limit is tried again every five minutes, for up to a day.

A message that was not sent is deleted after 30 days.

What the other members see#

Nothing until the message is sent. There is no notice that a message is scheduled, and the clocks and the lists are for the sender alone. Once sent, the message is dated the time it was sent, not the time it was written.

Where it is offered#

PlaceScheduled messages
Private and group conversationsYes
Chat rooms, groups, courses and booking conversationsYes
A new conversation, before its first messageNo
End-to-end encrypted conversationsNo
Guests and AI chat botsNo

How to turn it on#

WP Admin → Better Messages → Settings → Messaging → Conversation Features → Scheduled Messages

Settings, Messaging, Conversation Features: Pinned Conversations and Mark as Unread, the Scheduled Messages switch on with its description, and under it the role list Scheduled Messages Restricted Roles with Restrict selected roles chosen and every role unticked, then Draft Messages
  • Scheduled Messages turns the feature on for every member.
  • Scheduled Messages Restricted Roles keeps the roles you tick from scheduling. Switch the list to Allow only selected roles to let only the ticked roles schedule, for example only moderators who post announcements.

Turned off, nothing can be scheduled and nothing scheduled is sent. The messages that wait are kept, and are sent when it is turned on again, unless their time passed more than a day before. Until then the clock beside the reply area still shows them, and members can delete them.

A member whose role is restricted later keeps the clock and can delete what waits, but cannot schedule, edit or send it. Such a message is not sent at its time and shows as Not sent.

Sending on time#

Scheduled messages are sent by the background task of the plugin, which runs every minute through WP-Cron. WP-Cron runs when the site has visitors, so on a quiet site a message can go out a few minutes late. For exact times, run WP-Cron from the cron of the server every minute, as described in Hooking WP-Cron into the system task scheduler.

For developers#

  • POST /wp-json/better-messages/v1/thread/{id}/schedule schedules a message: message, send_at (Unix seconds), files (attachment ids uploaded to the conversation), meta.reply_to, meta.poll (a poll as the poll route takes it) and meta.location, or kind (voice or video) with the uploaded recording in files and its media (duration, waveform). It answers the scheduled message, with preview, the message as the conversation will draw it, and the count of the member for the conversation.
  • GET /wp-json/better-messages/v1/scheduled lists the scheduled and failed messages of the current member, all of them or of one conversation with thread_id.
  • POST scheduled/{id} changes the text or send_at, POST scheduled/{id}/send sends it now and POST scheduled/{id}/delete deletes it. Each answers only the member who scheduled the message.
  • The conversation object carries permissions.canSchedule and scheduled, how many messages of the member wait there or were not sent. Neither is sent to anyone else.
  • A delivered message carries the message meta scheduled_id.
  • The better_messages_message_scheduled, better_messages_scheduled_message_sent and better_messages_scheduled_message_failed actions fire as a message is scheduled, sent and not sent.
  • better_messages_can_schedule_message decides per conversation and member, and better_messages_scheduled_min_delay, better_messages_scheduled_max_ahead, better_messages_scheduled_max_per_user (100) and better_messages_scheduled_overdue_seconds (a day) change the limits.

Frequently asked questions#

Can a member schedule a message to someone they have no conversation with yet?#

Not yet. The conversation has to exist: send the first message, then schedule the next ones.

Can a message repeat, every Monday for example?#

No. Each scheduled message is sent once.

Is a scheduled message stored encrypted?#

With stored data encryption on, its text is stored encrypted like any message.

Are the files of a scheduled message deleted by the attachment cleanup?#

No. They are kept until the message is sent or deleted, and Delete old attachments counts from the time the message was sent.

See also#

  • Message drafts — keep an unsent message in the reply area
  • Mark as unread — keep a read conversation in front of you with a dot
  • Mass messaging — send one message to many members at a time an administrator chooses