<p>To schedule a message, simply provide a future unixtime in the <code>schedule_date</code> flag of <ahref="/method/messages.sendMessage">messages.sendMessage</a> or <ahref="/method/messages.sendMedia">messages.sendMedia</a>. </p>
<p>The specified message or media will be added to a server-side schedule queue for the current chat, and will be automatically sent at the specified time.<br>
The method call generates the following updates:</p>
<ul>
<li>Immediately, an <ahref="/constructor/updateNewScheduledMessage">updateNewScheduledMessage</a>, with ID equal to the ID of the message in the schedule queue for the current chat (each PM, chat, supergroup and channel has its own schedule queue and ID sequence).</li>
<li>At <code>schedule_date</code>, an <ahref="/constructor/updateNewMessage">updateNewMessage</a> or <ahref="/constructor/updateNewChannelMessage">updateNewChannelMessage</a> with the <code>from_scheduled</code> flag set, indicating to the sender that the specified scheduled message was sent. </li>
<li>At <code>schedule_date</code>, an <ahref="/constructor/updateDeleteScheduledMessages">updateDeleteScheduledMessages</a>, indicating that the message was flushed from the schedule queue.</li>
</ul>
<p>If the <code>schedule_date</code> is less than 10 seconds in the future, the message will be sent immediately, generating a normal <ahref="/constructor/updateNewMessage">updateNewMessage</a>/<ahref="/constructor/updateNewChannelMessage">updateNewChannelMessage</a> . </p>
<h3><aclass="anchor"href="#manipulating-the-schedule-queue"id="manipulating-the-schedule-queue"name="manipulating-the-schedule-queue"><iclass="anchor-icon"></i></a>Manipulating the schedule queue</h3>
<p>Clients can manually edit the schedule queue of a certain chat, providing the scheduled message ID obtained from <ahref="/constructor/updateNewScheduledMessage">updateNewScheduledMessage</a>. </p>
<ul>
<li><ahref="/method/messages.getScheduledHistory">messages.getScheduledHistory</a> obtains all messages in the schedule queue for the specified chat</li>
<li><ahref="/method/messages.getScheduledMessages">messages.getScheduledMessages</a> obtains information about specific messages in the schedule queue for the specified chat</li>
<li><ahref="/method/messages.sendScheduledMessages">messages.sendScheduledMessages</a> flushes messages from the schedule queue, sending them immediately</li>
<li><ahref="/method/messages.deleteScheduledMessages">messages.deleteScheduledMessages</a> deletes messages from the schedule queue, without sending them</li>
<li><ahref="/method/messages.editMessage">messages.editMessage</a> can be used to modify the scheduled date of a specific message in a schedule queue. </li>
</ul>
<p>Modifying scheduled messages will generate an <ahref="/constructor/updateNewScheduledMessage">updateNewScheduledMessage</a> with the same ID, and updated information.<br>
Deleting scheduled messages will generate an <ahref="/constructor/updateDeleteScheduledMessages">updateDeleteScheduledMessages</a>. </p></div>
</div>
</div>
</div>
<divclass="footer_wrap">
<divclass="footer_columns_wrap footer_desktop">
<divclass="footer_column footer_column_telegram">
<h5>Telegram</h5>
<divclass="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.