---
title: "Deploy Cron Rust"
description: "Cron Rust Runner — ultra-light HTTP schedule second precision - light cron"
category: "Automation"
url: https://railway.com/deploy/cron-rust
---

# Deploy Cron Rust

Cron Rust Runner — ultra-light HTTP schedule second precision - light cron

**[Deploy Cron Rust on Railway](https://railway.com/template/cron-rust)**

- **Creator:** Xav's Projects
- **Category:** Automation
- **Total deploys:** 2

## Template content

### Cron Rust https://www.nicepng.com/png/full/34-348422_community-spotlight-rust-programming-language.png

- **Source:** https://github.com/XavTo/cron-rust

## Documentation

# Cron Runner (Rust)

Lightweight HTTP scheduler built in Rust with **per-second cron precision**.  
Runs as a persistent process—no external cron needed.  
Each request includes an `X-Cron-Secret` header, with optional custom headers and body support.

## Why use it

* Schedule HTTP jobs with second-level precision.  
* Replace heavy schedulers with a single tiny binary.  
* Centralize recurring API calls

## How to Deploy

1. Click **Deploy on Railway**.  
2. Set environment variables:
   * `SECRET`: shared secret sent as `X-Cron-Secret`.
   * `CRON_JOBS`: your job list (see below).  
3. Deploy as a **persistent service** (not a Railway cron).

## Environment Variables

**`SECRET`** – required  
Shared secret included as `X-Cron-Secret`.

**`CRON_JOBS`** – required  
Jobs separated by `;` or new lines.  
Format: `METHOD|URL|CRON_EXPR|HEADERS|BODY`

* `METHOD`: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`
* `URL`: full HTTP(S) endpoint  
* `CRON_EXPR`: **6-field cron** (supports seconds)  
* `HEADERS`: comma-separated `Name:Value` pairs, separated by commas *(optional)*  
* `BODY`: raw string *(optional)*  

**Example**
```
GET|https://httpbingo.org/status/204|0 * * * * *||
POST|https://httpbin.org/post|*/30 * * * * *|Content-Type:application/json,Authorization:Bearer XYZ|{"ping":true}
```

## Logs

Each run outputs one line:
```
YYYY-MM-DDTHH:MM:SSZ | OK | METHOD URL | STATUS
YYYY-MM-DDTHH:MM:SSZ | FAIL | METHOD URL | transport error: ...
```

## Tech Stack

Rust + `ureq` (sync, minimal)  
`cron` crate for per-second scheduling


## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/cron-rust
