R
Railway2mo ago
Matts

cron job seems to be stuck

hi everyone, I just wanted to try the new cron job feature that was recently announced for some reason I have a cron job that has been stuck for the last 20 minutes. all the ones before executed within 5-10 seconds. I also tried going back to the old cron job logic now, but the current one is still executing
14 Replies
Percy
Percy2mo ago
Project ID: 4f4d148d-f0b0-4adc-8fcf-663c53192207
Matts
MattsOP2mo ago
4f4d148d-f0b0-4adc-8fcf-663c53192207
the project is just a basic api call

const axios = require('axios');
require('dotenv').config();

async function fetchData() {
try {
const url = "https://....";
if (url) {
console.log(`Sending request to: ${url}`)
const response = await axios.get(url, {
headers: {
'Authorization': `Bearer ${process.env.API_KEY}`
}
});
console.log(response.data); // Handle response
} else {
console.warn(`Skipping request because no url is set.`)
}
} catch (error) {
console.error(error); // Handle error
}
}

fetchData();
the project is just a basic api call

const axios = require('axios');
require('dotenv').config();

async function fetchData() {
try {
const url = "https://....";
if (url) {
console.log(`Sending request to: ${url}`)
const response = await axios.get(url, {
headers: {
'Authorization': `Bearer ${process.env.API_KEY}`
}
});
console.log(response.data); // Handle response
} else {
console.warn(`Skipping request because no url is set.`)
}
} catch (error) {
console.error(error); // Handle error
}
}

fetchData();
`
angelo
angelo2mo ago
!t
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
This thread has been escalated to the Railway team.
You're seeing this because this thread has been automatically linked to the Help Station thread.
Matts
MattsOP2mo ago
just for further clarification I had the new cron logic running for around 30-40 minutes and it executed every 5 minutes. took around 5-10 seconds each time. one execution got stuck for around 20 minutes before I went back to the old cron logic
angelo
angelo2mo ago
Gotcha, we are conducting an investigation to see the source of the issue.
Matts
MattsOP2mo ago
Thank you!
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
Okay- the cron seems to be unstuck or did you apply the revert flag on the feature?
You're seeing this because this thread has been automatically linked to the Help Station thread. New reply sent from Help Station thread:
I applied the revert flag to the old logic around 6-7 hours ago. Would still be interesting why it was stuck on the new logic
You're seeing this because this thread has been automatically linked to the Help Station thread.
Matts
MattsOP2mo ago
also now on the new logic ( I wanted to try it again), it looks like this which I think is wrong, right?
No description
Duchess
Duchess2mo ago
New reply sent from Help Station thread:
Gotcha- so qq: does your cron exit on success?
You're seeing this because this thread has been automatically linked to the Help Station thread.
Ayush
Ayush2mo ago
I also am having the same issue... At the moment when its stuck i duplicate the service and delete the offending service. This seems to resolve the issue for a few hours until it gets stuck again. This never happend on the v1 cron. Is there a way forward or do we need to revert back to the old cron experience?
No description
angelo
angelo2mo ago
You should likely revert to the old cron experience. You can do so via the service settings, scroll down to feature flags, and revert the feature.
Ayush
Ayush2mo ago
thank you!
Matts
MattsOP2mo ago
alright, thanks @Angelo
Want results from more Discord servers?
Add your server