Guide

Schedule Emails from Terminal

Scheduling email from the terminal means queuing a message for future delivery without a browser, GUI client, or third-party scheduling service. Nylas CLI's --schedule flag accepts relative times (2h, tomorrow 9am) and absolute ISO-8601 timestamps, then holds the message server-side until the send window opens. Check `nylas email send --help` to confirm flag availability in your CLI version.

Written by Prem Keshari Senior SRE

VerifiedCLI 3.1.11 · Gmail, Outlook · last tested May 23, 2026

Command references used in this guide: nylas email send, nylas email list, and nylas auth login.

Why schedule email from the terminal?

Scheduling email from the terminal means writing a message now and delivering it at a specific future time without keeping your machine online. The server holds the message and sends it at the scheduled time. According to a 2024 HubSpot study, emails sent between 9 AM and 12 PM in the recipient's time zone get 23% higher open rates than messages sent outside business hours. CLI-based scheduling lets you compose at midnight and deliver at 9 AM without a browser tab open.

Gmail's web UI supports scheduled sends, but only through the GUI. Outlook's “Delay Delivery” feature requires the desktop client running until send time. The CLI handles scheduling server-side, so once you run the command, your terminal session can close. This works in cron jobs, CI/CD pipelines, and agent automation scripts where no GUI is available.

How do you schedule a single email send?

The --schedule flag on nylas email send accepts 3 formats: relative durations like 2h or 30m, natural language like "tomorrow 9am", and absolute timestamps like "2026-06-01 14:30". The server queues the message and delivers it at the specified time. No local process needs to stay running after the command returns.

The examples below show each scheduling format. Relative times are useful for follow-up reminders (“send this in 2 hours”). Natural language works for business-hours targeting. Absolute timestamps are best for batch scripts where you compute exact delivery times from a spreadsheet or database.

# Requires nylas CLI v2.0+. Run: nylas email send --help to verify.

# Schedule with a relative time (2 hours from now)
nylas email send \
  --to colleague@company.com \
  --subject "Meeting notes" \
  --body "Here are the notes from today's standup." \
  --schedule 2h

# Schedule with natural language
nylas email send \
  --to client@example.com \
  --subject "Weekly report" \
  --body "Attached is this week's summary." \
  --schedule "tomorrow 9am"

# Schedule with an absolute timestamp
nylas email send \
  --to team@company.com \
  --subject "Sprint review reminder" \
  --body "Sprint review starts in 30 minutes." \
  --schedule "2026-06-02 09:30"

The command returns a scheduled message ID immediately. You can use this ID to check status or cancel the send before the delivery window opens. Once the message sends, it appears in your Sent folder like any other email.

How do you manage scheduled messages?

The nylas email scheduled subcommand group lets you list all pending sends, inspect individual messages, and cancel sends that haven't fired yet. Listing returns every queued message with its scheduled delivery time, recipient, and subject line. This is useful for verifying that a batch of 20 scheduled emails queued correctly before you close your terminal.

Cancellation works any time before the scheduled delivery time. Once the message sends, it can't be recalled (Gmail supports a 5-30 second undo window, but that's a GUI-only feature). The show subcommand displays the full message body and headers for a scheduled message, so you can verify content before delivery.

# List all scheduled (pending) messages
nylas email scheduled list

# View details of a specific scheduled message
nylas email scheduled show SCHEDULED_ID

# Cancel a scheduled message before it sends
nylas email scheduled cancel SCHEDULED_ID

# List scheduled messages as JSON for scripting
nylas email scheduled list --json | \
  jq '.[] | {id: .id, to: .to, subject: .subject, send_at: .send_at}'

The JSON output from nylas email scheduled list includes a send_at field with the Unix timestamp of scheduled delivery. You can pipe this into monitoring scripts that alert you if a scheduled message is within 5 minutes of sending and hasn't been reviewed yet.

How do you batch-schedule from a CSV?

Batch scheduling sends multiple emails at different times from a single script. A common use case is weekly status reports to 10 stakeholders in different time zones, each scheduled for 9 AM in their local time. The CSV approach reads recipients, subjects, bodies, and send times from a file and loops through each row, calling the send command with --schedule for each entry.

The script below reads a 4-column CSV (email, subject, body, schedule_time) and sends each message with its own delivery time. Runtime depends on network latency and your account's rate limits. You can also create drafts first with nylas email drafts create for a review-then-schedule workflow.

# batch-schedule.csv format:
# recipient,subject,body,schedule_time
# alice@company.com,Monday report,Here is the weekly summary.,tomorrow 9am
# bob@london.co.uk,Monday report,Here is the weekly summary.,tomorrow 2pm

# Send each row from the CSV
tail -n +2 batch-schedule.csv | while IFS=',' read -r email subject body schedule; do
  nylas email send \
    --to "$email" \
    --subject "$subject" \
    --body "$body" \
    --schedule "$schedule"
  echo "Scheduled: $email at $schedule"
done

# Verify all messages queued
nylas email scheduled list --json | jq 'length'

After running the batch script, use nylas email scheduled list to confirm all messages queued. The jq 'length' command at the end prints the total count of pending scheduled messages. If the count doesn't match your CSV row count, check for malformed rows or authentication errors in the script output.

How does scheduling differ from cron sends?

Cron sends and scheduled sends solve the same problem (deliver email at a future time) but work differently. Cron requires your server to be running at send time. The cron daemon fires your script, the script calls nylas email send without --schedule, and the email goes out immediately. If the server is down at fire time, the email doesn't send. Cron also doesn't retry on failure by default.

Feature--schedule flagcron + send
Server required at send timeNo (server-side queue)Yes (local machine must be on)
Cancel before deliveryYes (scheduled cancel)Remove crontab entry
Natural language timesYes ("tomorrow 9am")No (cron syntax only)
Recurring sendsNo (one-time only)Yes (cron schedule expression)
Best forOne-time future deliveryRecurring daily/weekly reports

Use --schedule for one-time future sends like follow-up emails, meeting reminders, and end-of-day reports. Use cron for recurring sends like daily monitoring alerts, weekly digests, and monthly summaries. The cron job email guide covers the recurring pattern in detail, including error handling and retry logic.

Next steps