Skip to content
CLI 5.64.0: complete cron logs across scheduled runs
maxnotorio
OP

a month ago

I am preparing a controlled background-worker repair on Hobby and need reliable read-only evidence from an existing scheduled cron service. This question does not request any deployment or configuration change.

Local help from our pinned CLI 5.64.0 rejects cron list (unrecognized subcommand), but supports logs --since, --until, --lines and an explicit deployment ID. We observed a cron deployment ID change while its image digest stayed the same. Our local collector has not demonstrated complete coverage of multiple scheduled cycles; we are not claiming the cron itself failed for this reason.

  1. With CLI 5.64.0 or the supported API, how should we identify each scheduled execution and distinguish it from a rebuild/redeployment? Can scheduled runs change deployment ID while keeping the image?
  2. What is the supported way to retrieve all logs for six consecutive natural runs over at least 30 minutes, bind them to the correct execution, and detect truncation or missing runs? Does a bounded logs --since/--until request cover one deployment or successive executions?
  3. When a service region field is null, which read-only field establishes the effective replica region? What are the canonical empty representations of preDeployCommand?

Please provide the documented commands or query shape. No UUIDs, private configuration, credentials or raw logs are included here. Additional internal identifiers would require separate owner approval.

Solved

1 Reply

Railway
BOT

a month ago

railway cron list was added in a CLI release newer than 5.64.0, which is why your pinned version rejects it. On a current CLI it lists each run, scheduled or triggered with railway cron run, with its status, start time, duration and deployment ID. --json gives id, deploymentId, status, createdAt, completedAt, durationSeconds and meta, and --limit goes up to 1000. A run can show a different deployment ID from earlier runs while the image stays the same, so a new deployment ID on its own does not mean a rebuild. Each run has its own id, and a run skipped because the previous one was still going shows as SKIPPED.

A logs request with --since/--until is limited by time, not by run, and returns logs from one deployment. To capture six consecutive runs, list them with railway cron list --json. Then run railway logs once per run, using that run's deployment and its createdAt/completedAt window, rounding the end up to the next whole second. You can spot missing runs by comparing the run list against the schedule and looking for gaps or SKIPPED entries. We don't provide a truncation flag, so check each window's output against the run's own start and end times.

If a service's region field is null, the region and replica count it actually runs with are in the deployment's metadata (multiRegionConfig). An empty preDeployCommand comes back as null or [], never as an empty string.

See railway cron for the full command reference.


Status changed to Awaiting User Response Railway • about 1 month ago


Railway
BOT

24 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 24 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...