There was a problem loading the comments.

Add cron job to call a URL

Support Portal  »  cPanel  »  Viewing Article

  Print

In cPanel, go to "Cron Jobs" in the advanced section:

ByF5pBZvddGJEr0uUgorH5Ztbbc6Q8RAE0oPJySE2o.png

 

Under "Add New Cron Job", you can select a "Common Setting" on how often you want your cronjob to run, this can, for example, be once per day.

In your command you have to use either curl or wget to call the URL you want:

curl --silent "https://mydomain.com/cron.php?token=XXXXX" >/dev/null 2>&1

Or if using wget:

wget -O - "https://mydomain.com/cron.php?token=XXXXX" >/dev/null 2>&1

It's important to use double quotes if your URL contains a query string as seen above.

Your cronjob would end up looking something like this:

J9vpnuBsZhoIRr2QWTXd9qt5Q9hRkWPTBzWU4DQDmE.png

Attachments


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

CAPTCHA
© PerfGrid