Slack API · error code

Slack error time_in_past: Scheduled post_at is in the past

Permanent - do not retryHTTP 200Message content & Block Kit

Last verified against Slack API reference - chat.postMessage errors

What Slack returns
value passed for post_time was in the past.

What error time_in_past means

chat.scheduleMessage rejected your post_at because, by Slack's clock, that moment has already passed. The table reads "value passed for post_time was in the past" (the argument is actually named post_at, a Unix timestamp in seconds). The method's example error response uses this exact string.

Usually the math or units are wrong, not the intent. Computing a time in local time and treating it as UTC, building "tomorrow at 9:00" in the wrong timezone, or scheduling "in 5 seconds" when queue delays and clock drift eat the margin all produce times that are already gone when Slack checks.

The method has a matching upper bound. The docs say "You will only be able to schedule a message up to 120 days into the future," and beyond that you get time_too_far. They also cap scheduling at 30 messages within a 5-minute window per channel (restricted_too_many).

What it looks like

POST /api/chat.scheduleMessage
{"channel": "C123ABC456", "post_at": 1562180400, "text": "Standup in 10"}

{"ok": false, "error": "time_in_past"}

Why it happens

  • post_at was computed in local time but meant as UTC, or vice versa.
  • The schedule time was only seconds away and passed before the request arrived.
  • The server clock is behind or ahead.
  • A retry re-sent a request whose post_at has since passed.

How to fix Slack error time_in_past

  1. 1Compute post_at as integer Unix seconds in UTC and log it next to the current time.
  2. 2If the time is less than a minute away, post now with chat.postMessage instead.
  3. 3On retry, recompute post_at, or post immediately if the scheduled time has passed.
  4. 4Keep servers synced with NTP.

How to stop it recurring

Wrap scheduling in one helper that converts user-facing times with explicit timezones, rejects anything under a small safety margin, and enforces the 120-day ceiling before calling Slack. Bulk schedulers should also spread messages to stay under the 30-per-5-minutes channel cap.

Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.

Related codes

Error time_in_past - quick answers

What does Slack error time_in_past mean?

chat.scheduleMessage rejected your post_at because, by Slack's clock, that moment has already passed. The table reads "value passed for post_time was in the past" (the argument is actually named post_at , a Unix timestamp in seconds). The method's example error response uses this exact string. Usually the math or units are wrong, not the intent.

How do I fix Slack error time_in_past?

1. Compute post_at as integer Unix seconds in UTC and log it next to the current time. 2. If the time is less than a minute away, post now with chat.postMessage instead. 3. On retry, recompute post_at, or post immediately if the scheduled time has passed. 4. Keep servers synced with NTP.

Should I retry after error time_in_past?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging Slack by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.