Skip to main content

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

ExpressionSchedule
* * * * *Every minute
0 * * * *Every hour
0 0 * * *Every day at midnight
0 0 * * 0Every Sunday at midnight
0 0 1 * *First day of every month