Codex Scheduled Tasks: Daily Reports on Your VPS

Codex Scheduled Tasks: Daily Reports on Your VPS — Run Codex scheduled tasks on a VPS with a systemd timer: explicit UTC scheduling, bounded runs, private logs and review gates without an always-open laptop.
Nov 30, 20265 mins read
Share with

A background process answers “will this run survive my SSH disconnect?” A recurring job answers a different question: “what should happen tomorrow at 06:00, and how will we know it worked?” We use Codex scheduled tasks for bounded reports before trusting them with recurring code changes.

This guide builds a manual Linux timer for a daily repository summary. It does not add a scheduler to Office Claws, and it does not automatically publish the report.

Codex scheduled tasks: choose the execution host

OpenAI's scheduled-task documentation distinguishes desktop project tasks from other scheduling surfaces. Desktop tasks that need local project files require the computer to stay on, the app to run and the project to remain available. Cloud and team tasks have separate requirements; do not assume all scheduled tasks run on your laptop.

For a repository on your own VPS, we can instead let Linux start codex exec. The timer lives on that server, not in the desktop app. A persistent host removes laptop sleep from the equation, but it does not remove authentication failures, subscription limits or operational responsibility. Start with one VPS runner; use the background-task guide for one-off interactive sessions.

A UTC timer starts one bounded Codex report, followed by logs and human review

Run your first agent in about 3 minutes

Install the Office Claws CLI, connect your Contabo account and Codex subscription, and your agent gets its own VPS and a desk in the office.

curl -fsSL https://officeclaws.com/downloads/install.sh | sh

$4.99/mo + your own Contabo VPS · keys stay in your keychain

Build one report-only service

The following files are examples for a Linux host using systemd user services. Replace /home/runner, the repository path and the executable path with your actual values. Check command -v codex as the intended non-root user: package-manager installations often live somewhere other than /usr/local/bin. A user service does not inherit your interactive shell setup.

Authenticate on the trusted runner as that same user before scheduling; never put access tokens in unit files. The non-interactive CLI documentation explains saved authentication and codex exec. Confirm options with your installed version's help.

# ~/.config/systemd/user/codex-daily.service
[Unit]
Description=Codex daily repository report
 
[Service]
Type=oneshot
WorkingDirectory=/home/runner/work/project
Environment=HOME=/home/runner
UMask=0077
ExecStart=/usr/local/bin/codex exec --sandbox read-only "Summarize the last 24 hours of local commits. Do not change files or publish anything."
TimeoutStartSec=45min

Create the parent directory and save this as the indicated service file. Use a dedicated checkout with reviewed instructions and configuration. The report sees local commits and refs: this example does not fetch remote changes, install dependencies or run tests. If fresh remote input is required, prepare it through a separately reviewed, scoped step.

The read-only sandbox limits ordinary filesystem writes; it is not a complete security boundary for credentials, configured MCP tools or external services. Review those capabilities and host permissions separately. A prompt saying “do not publish” is not access control. See sandbox and approvals.

Schedule in UTC and test before enabling

Save the companion timer in the same directory:

# ~/.config/systemd/user/codex-daily.timer
[Unit]
Description=Schedule the Codex daily report
 
[Timer]
OnCalendar=*-*-* 06:00:00 UTC
Persistent=false
Unit=codex-daily.service
 
[Install]
WantedBy=timers.target

This chooses 06:00 UTC, not the laptop's time zone. Persistent=false deliberately skips missed runs while the timer is inactive: we prefer no stale catch-up report after maintenance. Change that policy only after deciding whether a late run is useful.

systemctl --user daemon-reload
systemctl --user start codex-daily.service
journalctl --user -u codex-daily.service -n 100 --no-pager
# Enable only after reviewing the manual run:
systemctl --user enable --now codex-daily.timer
systemctl --user list-timers codex-daily.timer

Read the first report before enabling the timer. systemd will not start a second instance of this same service while it remains active; this does not lock other units or manually launched Codex processes. Keep a single owner for this job. The 45-minute limit bounds runtime and terminates an overlong service; a timeout is failure, not successful completion.

For a user timer to survive logout reliably, the user manager must remain available. An administrator can approve lingering for the dedicated account using loginctl enable-linger runner. Do not run the agent as root to avoid configuring the user service. Confirm the timer after logout and after a host restart.

Review results, failures and the real bill

By default, systemd sends stdout and stderr to the journal. Codex's final response and progress output can therefore contain private repository information. Configure journal access, retention and persistent storage deliberately; UMask=0077 does not make a shared journal private. If the journal is not persistent or approved for this data, use access-controlled report files and a retention policy instead.

We check three things: whether the timer fired, whether the service completed successfully, and whether the report actually covers the intended revision and time window. An exit code of zero proves neither completeness nor accuracy. Keep monitoring outside this job so a failed report does not have to announce its own failure.

Do not blindly retry a job that later gains external side effects. Establish deduplication and explicit approval first. Keep commits, pushes and deployments out of this reporting service; recurring execution is not recurring permission to ship.

Office Claws manages Codex agents through a desktop app and CLI on your own Contabo VPS with private Tailscale connectivity. This timer remains your Linux configuration, not a built-in Office Claws scheduling feature. Budget for Office Claws ($4.99/month for the first self-hosted agent), the VPS and an eligible ChatGPT plan separately. Subscription usage limits still apply; a server available 24/7 does not provide unlimited model work.

Our recommendation: schedule one read-only report, inspect several runs and a failure, then expand its scope only when ownership, evidence and review are clear.

Author

Office Claws Team

Building the future of AI agent management at Office Claws. Sharing insights on infrastructure, security, and developer experience.

Run your first agent in about 3 minutes

Install the Office Claws CLI, connect your Contabo account and Codex subscription, and your agent gets its own VPS and a desk in the office.

curl -fsSL https://officeclaws.com/downloads/install.sh | sh

$4.99/mo + your own Contabo VPS · keys stay in your keychain