R
Railway12mo ago
psgeorge

Cronjob broken, node can't find module

Hey! My cronjob which has been running fine for months, suddenly stopped working a couple of days ago with no changes or rebuilds on my end. I added a Dockerfile to try to fix this, and when I build the Dockerfile and run it locally, it works fine. But I get this error: can't find module /app/cron.js when it tries to run on Railway. Any help would be much appreciated, Cheers
2 Replies
Percy
Percy12mo ago
Project ID: 2bbc885c-7904-4d61-a9a6-3d1a117d28d2
psgeorge
psgeorgeOP12mo ago
Project ID: 2bbc885c-7904-4d61-a9a6-3d1a117d28d2 So I've figured out that the start command that is being used is different to the start command in railway.toml and the UI It was using a previous custom start command from ages ago instead of the railway.toml specified one (which was the one displaying, greyed out, on the UI) Removing startCommand from railway.toml, setting the startCommand manually in the UI, then reverting the commit to railway.toml fixed the issue. Would appreciate some credits on this because completely wasted a couple hours of my time (and broken app functionality for 2 days) with this bug 🙏
Want results from more Discord servers?
Add your server