Search code examples
croncpanel

cron job to run url cpanel


i need to create cron job to run URL from Cpanel every minute
when i open the link from browser it's auto generate backup for database

i choose the common setting ( once per minute ) * * * * *
and this is the command i use but no one worked

GET http://example.com/backup > /dev/null
wget http://example.com/backup
curl -s http://example.com/backup > /dev/null
wget -q -O /dev/null "http://example.com/backup" > /dev/null 2>&1

this is my references
https://forums.cpanel.net/threads/cron-job-to-call-a-web-page.60253/
Using CRON jobs to visit url?
CRON command to run URL address every 5 minutes


Solution

  • use this

    wget -q -O - http://example.com/backup >/dev/null 2>&1
    

    instead of

    wget -q -O /dev/null "http://example.com/backup" > /dev/null 2>&1