Cron job not working on URL

I’m using WordPress and want to delete unattached media. I have created the script but want to run through Cron job. I have created a page and call the template in page everything is working fine. But when I’m trying the URL in Cron job it is not working.

*/5 * * * * wget -O - http://www.example.com/delete-trashed-products >/dev/null 2>&1

*/5 * * * * wget (same link)

*/5 * * * * curl (same link)

*/5 * * * * GET (same link)

I’m unable to add all URLs. I have run these scripts after 5 minutes interval but nothing worked.

Read More

Can anybody please help me to figure out the problem?

Related posts