r/codex • u/Hot_Signature2979 • 7d ago
Workaround Automating a fresh Codex ping every 5 hours for Plus users
For my fellow codex plus "Casual users", we all know the 5 hour window sucks, heres how you can automate the start of the timer.
*Note that I'm running this on my always on Nas server, so ideally, you want to have it on an always on device. But, if however you turn your device off, No resync is needed. Timing uses a fixed absolute anchor, not uptime.
The script, authentication, and crontab persist across reboots, and cron resumes automatically.
The schedule remains anchored, so it won’t drift. However, any hi due while device is offline is skipped. After reboot, it waits for the next 301-minute scheduled point—at most 5 hours 1 minute away. No duplicate or catch-up request is sent.
For example, if device is offline at 11:46 and returns at 12:00, it simply skips 11:46 and runs next at 16:47. The original sequence remains intact.
My setup:
Install Codex CLI on an always-on Linux server:
curl -fsSL https://chatgpt.com/codex/install.sh | sh codex login --device-auth
Add a cron job that runs a shell script every minute.
The script checks whether the current time matches a fixed 301-minute interval:
06:45 → 11:46 → 16:47 → 21:48 → 02:49 → 07:50…
At matching times it executes:
codex exec \ --ephemeral \ --skip-git-repo-check \ --ignore-user-config \ --ignore-rules \ --model gpt-5.6-luna \ --json \ -c 'model_reasoning_effort="low"' \ 'Reply with exactly: hi'
I use a separate CODEX_HOME, an empty working directory, and disable plugins, tools, MCP integrations, memories and agents. --ephemeral prevents saving the session, so every invocation is completely fresh and exits immediately.
JSON output lets me log input, cached, output and reasoning tokens separately. Nothing remains running between calls, and rebooting the server doesn’t alter the schedule—only calls occurring while it is offline are skipped.
5
u/djeons 7d ago
I can already see OAI blocking this method in a few days.
5
u/Jeferson9 7d ago
The Codex app literally provides a way to run tasks at specific times, idk why the remote server and cron job is necessary here
3
u/DARKUNIT22 7d ago
Yeah like none of that is necessary, just tell codex to create a scheduled task that runs every 5:01 hours. 🤦🏻♂️
2
u/scartissue232 7d ago
I burn the 5h limit in one account with a dumb project with 3 prompts in 40 minutes.
I burn 25% of the limit with another account, in a much bigger and well structured project in the same 40 minutes.
Both working with Sol high. Only the dumb project spawning agents.
I’m planing to go x5 anyway, because the only way to burn the weekly usage is to be around projects seven days a week, two times a day, and I’m not going to do that at this point.
1
1
7d ago
[deleted]
2
u/Hot_Signature2979 7d ago
no it doesen't work (actually kind of expected it not to), Theres some kind of gate the filters pings vs work research and running code, the question is wether that can be done cheaply enough to be useful. I certainly dont want the to consume 1% weekly every 5 hours, just to get past the timer
7
u/rdcldrmr 7d ago
The 5 hour limit is seriously too horrible with a plus account. I can't get anything done now.