Plugin:TabSRMM/Send later

From Miranda NG
< Plugin:TabSRMM
Revision as of 02:09, 28 October 2022 by Dart Raiden (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Other languages:

This is a new feature in TabSRMM 3 and replaces the old method of sending to multiple contacts. It also allows to schedule messages, that could not be delivered for whatever reason, to be sent at a later time. This feature should be considered experimental and there may be bugs. By default, it is disabled and you have to enable it on Message sessions → Advanced tweaks → Enable unattended send. A restart is required after changing this option.

There are 3 ways to use the unattended send feature

  1. Schedule a message after a failed delivery attempt. Whenever a message fails to deliver, TabSRMM will offer you to resend it later. In that case, the message is saved to the database and added to the internal queue of unattended send jobs. These send jobs will survive a restart of Miranda, because they are saved to the database.
  2. Manually use the "Send later" menu entry from the send menu. The send menu (available from the pulldown arrow next to the send button or by using Ctrl+S allows you to enable the Send later menu entry. Doing so will cause all messages you send while this mode is enabled to be scheduled for later delivery in the unattended send queue. While this feature is enabled, the message input area will be surrounded by a blue border, indicating that messages you send will NOT be delivered immediately.
  3. Sending to multiple contacts. This feature will also use the unattended send queue to deliver a single message to multiple contacts. The interface is the same as in TabSRMM version 2 – you use the embedded contact list to select the target contacts. To activate multi send, you can use Ctrl+M or choose the Send to multiple contacts entry from the Send menu (see #2).

The main difference in multisend is that such jobs will not be saved to the database, so when you exit Miranda before all of them were delivered successfully, they are lost.

How often is the queue checked for new jobs

Once per minute (approximately). Adding a new job will force the queue to be processed within the next few seconds. Pending jobs will be checked about every 30 seconds whether they can be delivered.

When will scheduled jobs be sent?

This depends on the job type. Multisend jobs will be sent like normal messages and your current status mode is not taken into consideration. Jobs submitted by the send later feature will only be sent when your status mode is either Online or Free for chat. This is to protect your privacy – you probably don't want to automatically send messages while you are officially Away, Occupied or Busy.

What about resends, failed jobs, cleanup etc.?

The send queue will try to resend jobs at increasing intervals. After 5 unsuccessful tries, the job will be put on hold. Unsuccessful, in this context means that no ACK has been received for an attempt to send the message.

Jobs older than 3 days will be discarded from the queue.

Queue management

The queue manager

The UI for managing the list of open send jobs is available from the Miranda main menu under Send later job list.... The screenshot shows this dialog with a single queued message. Most of the information should be pretty clear, however, the Status field needs further explanation. The Status column has the following format:

:X/Text[c] (n)

The first letter can be either a capital S or M where the M stands for a multi send job while the S denotes a job submitted by the Send Later feature. The text is a plain text representation of the jobs status and the single letter enclosed by square brackets is a detailed status code. The last number (in parenthesis) is the number of send attempts.

The status text can take the following values

  • Failed: The job could not be completed, the number of attempts to send the message has reached the maximum number of allowed re-sends. A failed job will be removed from the queue.
  • Sent OK: The job is complete. The message has been delivered and the job will be removed at the next scheduled queue clean up.
  • Pending: The job is ready to be sent and waiting for delivery. The one-letter status code will explain, why it has not yet been sent.
  • Wait ACK: The job has been sent a short while ago and is waiting for the ACK message. Once it is received, the job will take the Sent OK status. However, if no ACK message will be received within a minute, the send attempt is considered to have failed. The job will be scheduled for re-sending.
  • Removed: The job has been marked for removal on user's request. No more send attempts will be made and the job will be discarded from the queue at the next scheduled clean up.
  • Suspended: The user has put the job on hold (suspended). No more delivery attempts will be made until the user resumes the job.

Meanings of the one-letter code in square braces

  • H: Job is on hold (suspended)
  • I: Invalid. The contact may have been deleted after the job was submitted. Such a job cannot be completed any longer and will be removed when the queue is cleaned up.
  • D: Deferred. At least 5 attempts were made to deliver the message, but none was successful. A deferred job can only be sent again after the user performed a manual reset.
  • M: My Status doesn't allow to send the message. This happens for send later job when your status does not allow automatic sends (you are not Online or Free for chat).
  • S: Job could be sent, but target contact is not online. The queue will periodically check the status of the target contact and deliver the message when it comes online.
  • R: Marked for removal on user's request.
  • A: Waiting for protocol ACK. Delivery in progress.
  • O: Job too old. Will be discarded in a future queue clean up.