---
title: "How to schedule automatic Discord messages: practical guide"
description: "Schedule automatic Discord messages: event announcements, daily reminders and recurring notices. Ready-made node-schedule and cron code, plus a no-code option."
url: "https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages"
type: "page"
language: "en-US"
---

Discord Bots · 3 min · Intermediate

Published on Jun 18, 2026 · Updated on Aug 26, 2026

# Schedule automatic Discord messages with a bot

Scheduled messages are great for event announcements, voting reminders and recurring notices. See how to implement them with node-schedule in a Node.js bot, plus scheduling best practices.

By [Equipe StreetHosting](https://streethosting.com.br/en/autores#equipe-streethosting) · StreetHosting infrastructure and support team

[Automation and webhooks](https://streethosting.com.br/en/guides/topics/automation) [Deploying and running apps](https://streethosting.com.br/en/guides/topics/deploy)

Summarize with:

[](https://chat.openai.com/?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "ChatGPT") [](https://claude.ai/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Claude") [](https://www.google.com/search?udm=50&aep=11&q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Google AI Mode") [](https://x.com/i/grok?text=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Grok") [](https://www.perplexity.ai/search/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Perplexity")

Share:

[](https://x.com/intent/tweet?text=How%20to%20schedule%20automatic%20Discord%20messages%20with%20a%20bot&url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages "Share on X") [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages "Share on Facebook") [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages "Share on LinkedIn") [](https://wa.me/?text=How%20to%20schedule%20automatic%20Discord%20messages%20with%20a%20bot%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fdiscord-bots%2Fdiscord-bot-schedule-messages "Share on WhatsApp")

For agents: Copy as Markdown [.md](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages.md)

In this guide 5 sections

* [Install node-schedule](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#node-schedule)
* [Message at a specific time](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#mensagem-unica)
* [Recurring message (daily/weekly)](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#recorrente)
* [Cancel scheduled jobs](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#cancelar)
* [Scheduling best practices](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#boas-praticas)

Quick answer

Install **node-schedule** with `npm install node-schedule`, then use `schedule.scheduleJob(rule, callback)` with cron syntax for recurring jobs. Always set the time zone with the `tz: 'America/Sao_Paulo'` option to avoid timing confusion.

## Install node-schedule[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#node-schedule)

node-schedule is the most widely used scheduling library for Discord bots in Node.js. To install it in your bot project:

`npm install node-schedule`

Then import it in your bot file:

`const schedule = require('node-schedule');`

Put your schedules inside the `client.once('ready', ...)` event so the bot is already connected to Discord before it tries to access channels and send messages.

## Message at a specific time[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#mensagem-unica)

To send a message at a specific date and time:

`client.once('ready', () => { const canal = client.channels.cache.get('ID_DO_CANAL'); // Schedule for December 25 at 00:00 Brasília time const data = new Date('2026-12-25T00:00:00-03:00'); schedule.scheduleJob(data, () => { canal.send('Merry Christmas! 🎄'); }); });`

The job is cancelled automatically after it runs. For dates in the past, the job never runs.

A scheduled message fires on its own, so the text has to be ready beforehand. For a maintenance notice, a countdown or a holiday greeting, write it in [writecord](https://writecord.streethosting.com.br/?utm%5Fsource=streethosting&utm%5Fmedium=site&utm%5Fcampaign=tools&utm%5Fcontent=guia%3Abot-discord-agendar-mensagens-discord) and paste the string straight into the job callback.

## Recurring message (daily/weekly)[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#recorrente)

Use cron syntax for schedules that repeat. The format is:

`second minute hour day-of-month month day-of-week`

`client.once('ready', () => { const canal = client.channels.cache.get('ID_DO_CANAL'); // Every day at 9 AM Brasília time schedule.scheduleJob( { rule: '0 9 * * *', tz: 'America/Sao_Paulo' }, () => { canal.send('Good morning! Remember to vote for the server today. 🗳️'); } ); // Every Monday at 10 AM schedule.scheduleJob( { rule: '0 10 * * 1', tz: 'America/Sao_Paulo' }, () => { canal.send("It's Monday! This week's news is in #announcements 📢"); } ); });`

* `0 9 * * *`: every day at 9 AM
* `0 12 * * 1`: every Monday at noon
* `0 0 1 * *`: on the 1st of every month at midnight
* `*/30 * * * *`: every 30 minutes

## Cancel scheduled jobs[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#cancelar)

To cancel a scheduled job, keep a reference to it and call the cancel() method:

`const job = schedule.scheduleJob('0 9 * * *', () => { canal.send('Daily message'); }); // Cancel when needed job.cancel();`

When the bot restarts, every in-memory schedule is lost. To make them persistent, save the schedule data in a database and reload the jobs in the `ready` event.

## Scheduling best practices[](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#boas-praticas)

* Always set the time zone with `tz: 'America/Sao_Paulo'` to avoid surprises
* Check that the channel exists before sending: `if (!canal) return;`
* Use try/catch inside the job callback so silent errors do not take down the process
* Avoid too many automatic messages: users may mute them or leave the server
* Test the schedule with a time a few minutes away before putting it in production

For the bot to run without interruptions and for jobs to fire correctly, you need stable hosting. See how to [host your bot 24/7](https://streethosting.com.br/en/guides/discord-bots/discord-bot-hosting-24-7) and how to set up [PM2 to keep the process running](https://streethosting.com.br/en/guides/discord-bots/deploy-discord-bot-pm2).

In this guide

* [Install node-schedule](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#node-schedule)
* [Message at a specific time](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#mensagem-unica)
* [Recurring message (daily/weekly)](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#recorrente)
* [Cancel scheduled jobs](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#cancelar)
* [Scheduling best practices](https://streethosting.com.br/en/guides/discord-bots/discord-bot-schedule-messages#boas-praticas)

## Frequently asked questions

Which library should I use to schedule messages in a Discord bot?

node-schedule is the most widely used for Discord bots in Node.js. It supports both one-off times (a specific Date) and recurring ones with cron syntax. node-cron is a simpler alternative for people who prefer plain cron syntax.

Do scheduled messages still work if the bot restarts?

Not by default. Schedules live in memory and are lost when the process restarts. For schedules that must survive restarts, save the data in a database (SQLite, MongoDB) and reload the jobs when the bot starts.

Can I schedule a message for a specific channel?

Yes. Look up the channel by ID with client.channels.cache.get('ID\_DO\_CANAL') and use channel.send() inside the schedule callback. Make sure the bot has the Send Messages permission in that channel.

What is the default time zone in node-schedule?

By default, node-schedule uses the time zone of the server where the bot is running. To pin a fixed time zone, use the tz option in the job settings, such as tz: 'America/Sao\_Paulo' for Brasília time.

Next step

See bot plans

24/7 Discord bots with fast activation and support in Portuguese.

[See bot plans](https://streethosting.com.br/en/bots)

## Related guides

[Discord bots Intermediate Deploy a Discord bot with Node.js and PM2: env vars and auto restart PM2 is a popular Node process manager for Discord bots because it restarts after a crash, survives reboots when paired with the startup hook and centralizes basic logs without standing up a whole Kubernetes cluster. This guide covers the ecosystem file, env vars for the token and how it fits hosting in Brazil. 4 min Read guide](https://streethosting.com.br/en/guides/discord-bots/deploy-discord-bot-pm2) [Discord bots Beginner 24/7 Discord bot hosting in Brazil Discord bot hosting 24/7 combines a process manager with automatic restart, a token kept out of your code, logs and a server in Brazil for low latency to the API and your players. 6 min Read guide](https://streethosting.com.br/en/guides/discord-bots/discord-bot-hosting-24-7) [Discord bots Beginner How to use a Discord webhook for server alerts A Discord webhook is a quick way to notify your team about incidents, deploys and outages without relying on manual monitoring. 2 min Read guide](https://streethosting.com.br/en/guides/discord-bots/discord-webhook-server-alerts)

[← Back to the Guide Center](https://streethosting.com.br/en/guides)
