I wanted to run the same work as a Codex scheduled task from the command line, sign in with my ChatGPT account, and connect an MCP server. These are separate steps: Scheduled manages the recurring task, codex exec runs a prompt, and codex mcp configures the tools available to the CLI. The examples below use Windows PowerShell.
Can the CLI launch an existing Scheduled task?
As of October 17, 2026, the documented CLI does not provide the Scheduled management interface or a command to run an existing scheduled task by name or ID. Use the desktop app or ChatGPT web to manage Scheduled tasks. The CLI can run the same instructions independently, but this does not trigger the saved Scheduled task. See the official Scheduled tasks documentation.
Save the full task instructions in task.txt, then pass that file to Codex:
Get-Content -Raw -Encoding UTF8 .\task.txt | codex exec -





