Skip to content

Instantly share code, notes, and snippets.

View razrinn's full-sized avatar
👋

Ray Azrin Karim razrinn

👋
View GitHub Profile
@razrinn
razrinn / README.md
Last active May 14, 2026 06:08
Railway Nightly Service Restart

Railway Nightly Restart

A small Bun + TypeScript script that restarts a Railway service's latest deployment on a schedule. Designed to run as a Railway cron service in the same project as the target service.

How it works

  1. Fetches the latest deployment for the target service via Railway's GraphQL API.
  2. Verifies it's in SUCCESS status (skips otherwise).
  3. Calls deploymentRestart to restart the running container without rebuilding.