Nginx – Cron – 301 Moved Permanently – Moved Permanently

I really haven’t been able to get to the bottom of why this occurs by I’m posting a solution that worked for me below:

For us, this occurred when running the following while set in cron

/usr/bin/curl http://www.xyz.com/action

After looking around this worked for us, modify the above command as below and run:

/usr/bin/curl -s -L "http://www.xyz.com/action"

Flags:

-s: Silent

-L: Location