Cron setup not working
uveerma
PROOP

a year ago

my railway.toml file:

[build]
builder = "nixpacks"
buildCommand = "npm run build"

[deploy]
startCommand = "npm start"
healthcheckPath = "/"
healthcheckTimeout = 100
restartPolicyType = "on_failure"
restartPolicyMaxRetries = 10

[[services]]
name = "bot"
envs = { NODE_ENV = "production" }

[[services.crons]]
schedule = "*/20 * * * *"
command = "curl $RAILWAY_PRIVATE_DOMAIN/cron" 

the /cron route is under src/index and I've added toml file in service settings

the cron schedule has not started yet, what other steps do I need to follow to make it work?

0 Replies

Loading...