7 Replies
[build]
builder = "nixpacks"
buildCommand = "echo 'Building from railway.toml' && npm run build"
[deploy]
startCommand = "echo 'Starting from railway.toml' && npm run start:cron"
healthcheckPath = "/"
healthcheckTimeout = 100
[[cron]]
schedule = "*/6 * * * *"
command = "echo \"Running cron job at $(date)\" && curl -v -X GET $RAILWAY_PUBLIC_DOMAIN/api/cron/update-prices"thats my railway toml, shows both build and deploy echo in logs but never cron.
looks like my cron is completly ignored ignore the highlighted stuff but cron doesnt show here once ?
9 months ago
At first glance that railway.toml looks wrong, it looks like it uses unsupported syntax.
Please transition to a json config so that you can have your IDE validate it.
8 months ago
Change the cron command to
command = "echo \"Running cron job at $(date)\" && curl -v -X GET https://$RAILWAY_PUBLIC_DOMAIN/api/cron/update-prices"
if that doesn't work try
command = "echo \"Running cron job at $(date)\" && curl -v -X GET https://${RAILWAY_PUBLIC_DOMAIN}/api/cron/update-prices"
or
command = "echo \"Running cron job at $(date)\" && curl -v -X GET https://${{RAILWAY_PUBLIC_DOMAIN}}/api/cron/update-prices"
