a year ago
Hi, I'm trying to understand how to set a CRON job into my project. After read documentation I didn't see how to do it.
I have a Astro project deployed and now I would like to create a CRON job to create the sitemap once a day.
The command it should run is npm run build:sitemaps
Thanks
0 Replies
Should I updated the railway.json?
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
a year ago
cron jobs would be enabled via the service settings, but before you do that, lets talk about what you expect out of the cron job.
I have a Astro project deployed and now I would like to create a CRON job to create the sitemap once a day.
your cron service would be a separate railway service and would not run in the context of your astro service, so im not sure how you are going to pass the file to your astro site, please tell me how you plan to implement this