Skip to content
Advertisement

Creating a Cron job for URL

I have a have a website that automatically pulls feeds and the operations works fine if I input a URL on my browser but I cannot open the URL on my browser every time. So I created a cron job on my cPanel for the link to be visited every 5 min, but it is not working. I have tried different codes, still noway.

Firstly this. */5 * * * * curl --request GET 'https://example.com/?pull-feeds=7b2e9c8d534d6c38ca98c726899b6153'

This was the result of the first enter image description here

Secondly: * * * * * wget -O - https://example.com/?pull-feeds=7b2e9c8d534d6c38ca98c726899b6153

Thirdly: * * * * * wget -qO /dev/null https://example.com/?pull-feeds=7b2e9c8d534d6c38ca98c726899b6153

And still none of them is working, except i manually put https://example.com/?pull-feeds=7b2e9c8d534d6c38ca98c726899b6153 on my browser.

Advertisement

Answer

Please use lynx text browser (if your server does not have lynx, install it).

then use

 */5 * * * * /usr/bin/lynx https://example.com/?pull-feeds=7b2e9c8d534d6c38ca98c726899b6153 -dump
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement