Closed karentamrazyan closed 2 years ago
Usually a 302 status code requires a redirection to complete the job. Since we don’t follow redirects, we assume the execution didn’t finish completely.
Why does your URL return a 302 in case of success?
This assumption is not very logical.
Here is a list of HTTP response categories:
In my opinion you can only assume that something went wrong if a server returns 4XX or 5XX. Every other HTTP response is technically NOT a failure.
As per this particular case, the job in question successfully passes an authentication and then the server redirects the authenticated visitor to their dashboard. Again, the whole process is failure free, yet your service interprets it as a failure and disables the cron job after a few attempts.
Please, fix it or give us a way to define what is a failure.
In most cases, jobs by our users get a 302 when the URL redirects to a https version or the www domain etc. Just treating the 3xx as successful would hide an actual problem in that case.
I'll check if I can make this configurable, though, to support your use case as well.
you could add a checkbox "treat a redirect response as a failed job", which can be on by default.
This is now available in the "Advanced" tab of the job editor. (Might need to do a forced refresh in the browser to see it.) Thanks for reporting!
thanks! works like a charm!
the cron job org site interprets a successfully executed job where a website return a 302 HTTP header as "Failed (HTTP error)"