Webjobs on Web App (Linux) is randomly deleted or cannot be generated (Bad request)
As the title says I have a Linux-based Web App. Recently WebJobs were enabled on Linux-based Web Apps and I tried to use it by running a scheduler every 10 minutes.
I did read through the documentation and saw that you are supposed to create a run.sh
file (in my case) or a zip with that and a settings.job
file.
My issue is that the creation of web jobs is almost random. 95% of the time I will get the below error of 'Bad Request' with no additional information whatsoever and the other 5% would be created fine (with no change whatsoever).
I have 2 deployment slots (Production and Staging). I am aware that WebJobs swap together with the rest of the files when you push to production and for that reason, I also added the below on my staging environment variables:
As I said above, sometimes the WebJobs would work but be randomly deleted from the WebApp. I know this cause when I FTP into the server or look at the files through Kudu I can see the files I uploaded then and there.
But they don't show on my portal out of the blue:
So I guess my 2 questions are as follows:
- Why are my WebJobs failing to be created on the grounds of 'Bad Request' and what exactly is a 'Bad Request'?
- Why do they randomly disappear from both my deployment slots? (This happened again and the last time they disappeared was as soon as the day switched to 29/05/2024 - no clue if this is any sort of help)