
Deploy OpenClaw Cron
Schedule recurring tasks for your always-on OpenClaw agent
Just deployed
/data
Deploy and Host self hosted OpenClaw Cron (Scheduled Agent Jobs and Automations) on Railway
OpenClaw Cron runs OpenClaw's built-in Automations scheduler on an always-on Railway service, so one-shot reminders, recurring agent turns, and scripted jobs fire on time without a laptop staying awake.
About Hosting OpenClaw Cron open-source software on Railway (self hosted OpenClaw Automations scheduled jobs and cron-style timers template)
OpenClaw Cron runs the OpenClaw gateway as one Railway service on port 18789, with a health check at /healthz and a volume at /data.
Why Deploy OpenClaw Cron, the Zapier alternative on Railway (Railway Free Trial)
Zapier is the easy default, but you pay per task and your logic lives on their platform.
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying OpenClaw Cron on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Railway vs Other Hosting Providers and VPS for OpenClaw Cron self hosting
Railway runs the one always-on service OpenClaw Cron needs, with a volume for scheduler state.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | One service on port 18789 with a volume at /data and health checks, deployed from the template with no SSH. | A Droplet you size and patch yourself, where you install Node or Docker and keep the gateway running. |
| AWS | A single service with the volume and public domain wired up, so jobs keep firing across redeploys. | EC2 or ECS, EBS, security groups, and IAM to set up before your first cron job runs. |
| Hetzner | Managed deploys with the volume and domain preconfigured, and no host to keep alive. | Cheap, fast boxes, but restarts, uptime, and backups for the gateway are on you. |
Common Use Cases for hosted OpenClaw Cron
- One-shot reminder: Schedule a single timestamp with
--session mainand--wake now, and the gateway injects a system event into your main conversation at that moment. Add--delete-after-runso the job cleans up after it fires. - Morning summary: A recurring agent turn runs on a cron rule in your timezone, reads a repo or inbox, and writes a short digest. The gateway must be up at that hour, which is why it belongs on Railway rather than a laptop.
- Nightly script with channel output: An isolated job starts a fresh session each run, executes a script, and delivers the result to Telegram or Slack without bleeding context into your daytime chats.
- Webhook-triggered job: An external system calls an inbound hook route on the gateway, and that call fires a job immediately, which suits CI pipelines or deploy notifications.
- Failure alert: A recurring check routes failure notifications to your team channel, and you should review
openclaw automations runs JOB_IDfor the first few runs before trusting it.
Dependencies for OpenClaw Cron Docker hosted on Railway
OpenClaw Cron runs as one Railway service built on the official OpenClaw Docker image, with a single persistent volume so scheduled jobs survive redeploys.
Deployment Dependencies for Managed OpenClaw Cron Service (AI Assistant Gateway)
- Railway project: one service exposing port 18789, health check at /healthz.
- Volume: mounted at /data, holding scheduler state under /data/.openclaw.
- Generated secret: OPENCLAW_GATEWAY_TOKEN (48 characters), pasted into the Control UI settings.
- Model provider key: OPENAI_API_KEY or ANTHROPIC_API_KEY so scheduled agent turns can run.
- Optional channel token: TELEGRAM_BOT_TOKEN if job output should reach a chat channel.
Implementation Details for OpenClaw Cron (Using OpenClaw official docker image)
The start command fixes volume ownership, applies OPENCLAW_RAILWAY_CONFIG (publicOrigin and allowed origins from RAILWAY_PUBLIC_DOMAIN, trustedProxies set to 100.64.0.0/10), then launches the gateway as the node user.
How does OpenClaw Cron compare against other ways to schedule agent tasks and recurring jobs
OpenClaw Cron vs Hermes Agent cron (Scheduler Built Into an Agent Runtime)
- Where OpenClaw Cron fits: Jobs are managed with the
openclaw automationsCLI and fire from the Gateway scheduler on the same box that hosts your sessions. - Schedule and session control: You choose one-shot timestamps, intervals, or cron rules, and pick a main session or a fresh isolated session per run.
- Where Hermes Agent cron wins: If you already run Hermes Agent, its built-in timer needs no extra gateway to manage.
OpenClaw Cron vs cron plus scripts (Classic Unix Cron Daemon)
- Agent turns, not just scripts: OpenClaw jobs can run a model turn with tools, or a command payload when you only need shell work.
- Delivery built in: Results can go to a chat channel or a webhook instead of being wired up by hand.
- Where plain cron wins: For a nightly backup or log rotation, the Unix daemon is smaller and needs no model provider.
OpenClaw Cron vs Zapier schedules (Hosted Automation Service)
- Self hosted and yours: The gateway runs on your Railway service, so job records live on the volume and you are not renting a workflow editor.
- Agent-aware steps: A scheduled turn can reason over your repo or inbox, which a fixed zap step chain does not do well.
- Where Zapier wins: For plain app-to-app flows with prebuilt integrations and a visual builder, Zapier is faster and needs no server work from you.
OpenClaw Cron vs GitHub Actions schedules (on: schedule Workflows)
- Always-on timing: The Gateway scheduler fires jobs while the service is up, so a 16:00 job runs at 16:00 instead of waiting for a queued runner.
- Chat-side results: Output can post straight to a channel you already use, not a workflow log you have to open.
- Where GitHub Actions wins: For a build, test, or deploy tied to a repo,
on: scheduleon GitHub-hosted runners keeps that work next to the code.
How to use OpenClaw Cron (the OSS AI assistant gateway)?
- Open the public Railway domain and paste the OPENCLAW_GATEWAY_TOKEN value into the Control UI settings. Copy it from the service variables.
- In the Railway service shell, run
openclaw devices approveto approve your browser. You only do this once per browser.
openclaw automations create "2027-02-01T16:00:00Z" --name "Reminder" --session main --system-event "Reminder: check the automations docs draft" --wake now --delete-after-run
- Run
openclaw automations listto confirm the job exists and see its next run time. - Run
openclaw automations get JOB_IDoropenclaw automations show JOB_IDto inspect its fields. - After it fires, run
openclaw automations runs JOB_IDto check history before you trust a recurring rule.
How to self host OpenClaw Cron on other VPS Services (OpenClaw self hosting guide)
Running OpenClaw Cron on your own VPS works like the Railway template, but you keep the gateway online yourself so scheduled jobs fire on time.
Clone the Repository
Pull the code onto the server and move into it.
git clone https://github.com/openclaw/openclaw.git
cd openclaw
Install Dependencies
Install the CLI globally, then run onboarding.
npm install -g openclaw@latest
openclaw onboard --install-daemon
Configure Environment Variables
Set a gateway token and point state at a persistent path.
export OPENCLAW_GATEWAY_TOKEN="your-48-char-token"
export OPENCLAW_STATE_DIR="/var/lib/openclaw/state"
export OPENAI_API_KEY="your-model-key"
Start the OpenClaw Cron Application
Run the gateway bound to the LAN, and keep it under systemd so jobs keep firing after you log out.
openclaw gateway --bind lan --port 18789
Railway handles the always-on process, persistent volume, and public HTTPS domain for you, which a bare VPS makes you wire up yourself.
Official Pricing of OpenClaw Cron (OpenClaw pricing)
OpenClaw is free and open source under the MIT license, so there is no OpenClaw paid plan to pick.
OpenClaw Cron cloud vs self hosted comparison (Pricing, features, costs, and more)
Running OpenClaw Cron yourself means you pay for hosting and model API usage, and OpenClaw itself is free MIT-licensed software.
Monthly cost of self hosting OpenClaw Cron on Railway
Expect roughly $10-25 per month for the Railway service, because the browser variant with Chromium needs about 1-2 GB of RAM.
System Requirements for Hosting OpenClaw Cron on a VPS
Plan for at least 1-2 GB of RAM if you use the browser image, and a persistent volume mounted at /data so job state under /data/.openclaw survives restarts.
Frequently Asked Questions (FAQs)
Do scheduled jobs run when my laptop is closed?
Yes, as long as the gateway is running on Railway.
What is the difference between main and isolated sessions?
A main session job injects a system event into your ongoing conversation, and with --wake now it can wake the agent right away.
How do I pick a timezone for a cron rule?
Set the timezone explicitly on the rule rather than trusting the default, since a rule in local time can fire hours off on a UTC server.
Where do job records live on the volume?
Scheduler state sits under /data/.openclaw on the volume, so jobs survive redeploys.
Why did a job run twice or not at all?
Common causes are a gateway restart during the scheduled minute, a timezone mismatch, or day-of-month and day-of-week fields that both matched, since those use OR logic.
How do I get results into a chat channel?
Set the job's delivery to a chat channel and configure failure notifications separately.
Template Content

