Cron Jobs
Schedule recurring tasks with standard cron expressions. The container starts, runs your command, and shuts down.
railpush.yaml
services:
- type: cron
name: nightly-cleanup
runtime: node
schedule: "0 2 * * *" # Every day at 2 AM
buildCommand: npm install
startCommand: node scripts/cleanup.js
Cron Expressions
| Expression | Schedule |
|---|---|
* * * * * | Every minute |
0 * * * * | Every hour |
0 0 * * * | Every day at midnight |
0 0 * * 0 | Every Sunday at midnight |
0 0 1 * * | First day of every month |