Marcelo Moura
Marcelo Moura
RRailway
Created by Marcelo Moura on 7/10/2023 in #✋|help
Cron job to schedule Python script
I successfully deployed my main application script as a API, but now I would also like to schedule some cron jobs to run python scripts. What am I doing wrong? It is not working for me. This is my railway json file: { "$schema": "https://railway.app/railway.schema.json", "build": { "builder": "NIXPACKS" }, "deploy": { "startCommand": "python application.py", "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 }, "cron": { "job": "0 0 * ? * ", "command": "python zera_consultas.py" }, "cron": { "job": "0 0 ? * *", "command": "python desbloqueia_usuarios.py" } }
33 replies
RRailway
Created by Marcelo Moura on 7/9/2023 in #✋|help
Schedule Python code using Cron
I want to deploy my python code as an api, but also would like to schedule some cron jobs to run python scripts. What am I doing wrong? this is my railway json file: { "$schema": "https://railway.app/railway.schema.json", "build": { "builder": "NIXPACKS" }, "deploy": { "startCommand": "python application.py", "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 }, "cron": { "job": "0 0 * ? * ", "command": "python zera_consultas.py" }, "cron": { "job": "0 0 ? * *", "command": "python desbloqueia_usuarios.py" } }
5 replies