# How to schedule an X thread from the command line > Use dun posts schedule-thread with one X account id & either a JSON file of tweets or --text split on ||. Threads need at least two tweets. Check dun posts x-cap before a large batch. Updated: 2026-10-05. ## The two thread commands `dun posts schedule-thread` queues a thread for later & `dun posts publish-thread` posts it now. Both are for X (Twitter) threads & take a single X account id. ## From a JSON file Put the tweets in a file. It can be an array of tweets, or an object with a `tweets` array: ```json [ { "content": "First tweet" }, { "content": "Second tweet" } ] ``` Then schedule it: ```bash dun posts schedule-thread \ --account X_ACCOUNT_ID \ --file ./thread.json \ --in 2h ``` To publish right away, use `publish-thread` with the same account & file. ## From a single --text If you'd rather not make a file, split one string on `||`: ```bash dun posts schedule-thread \ --account X_ACCOUNT_ID \ --text "First tweet || Second tweet || Third tweet" \ --in 2h ``` ## The rules - At least 2 tweets - Exactly one X account, passed as `--account` (singular) - Schedule with `--in` or `--at`, not both The thread appears in DunSocial as a thread head with its tweets, so you can review it in the calendar before it goes out. ## Check the monthly cap X has a monthly posting cap per workspace. Check usage before a big batch: ```bash dun posts x-cap ``` If the cap is reached, scheduling to X returns a rate-limited error, which the CLI reports with exit code 6. DunSocial shows cap usage for the workspace, so you can plan a batch around it. ## Character limits Each tweet is limited to 280 characters, or 25,000 on a connected X Premium account. Run `dun posts validate` on the text before queueing a long thread. Checking the text first matters more for threads than single posts, because a long thread has many chances to go over the limit. DunSocial applies the Premium limit only to accounts that actually have Premium. ## Not for Threads by Meta These commands post X threads. Threads by Meta is a separate platform: post to it with the ordinary `dun posts schedule` command & a Threads account id. DunSocial lists Threads accounts alongside X ones in `dun accounts list`, so check the provider before copying an id. ## Related guides - [How to schedule an X thread with an AI assistant](https://www.dunsocial.com/hub/dunsocial-mcp-guides/how-to-schedule-an-x-thread-with-an-ai-assistant.md) - [How to write a social media thread](https://www.dunsocial.com/hub/social-media-content-creation/how-to-write-a-social-media-thread.md) - [How to schedule a post with the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-schedule-a-post-with-the-dunsocial-cli.md) - [How to validate a post before publishing with the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-validate-a-post-before-publishing-with-the-dunsocial-cli.md) ## About this document This is the Markdown representation of https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-schedule-an-x-thread-from-the-command-line. The HTML version of the same page is at the same URL. You can also request Markdown from any page by sending `Accept: text/markdown`. Machine-readable summary of the whole site: https://www.dunsocial.com/llms.txt ## Company - Product: DunSocial, https://www.dunsocial.com - Legal entity: THISUX PRIVATE LIMITED, Chennai, Tamil Nadu, India - Support: support@dunsocial.com - Open the app: https://app.dunsocial.com/login