How would I use a cron job to send an HTML GET request?

前端 未结 4 648
没有蜡笔的小新
没有蜡笔的小新 2021-01-22 14:28

I would like to set up a cron job which sends an http request to a url. How would I do this? I have never set up a cronjob before.

4条回答
  •  轮回少年
    2021-01-22 14:57

    if you use linux

    crontab -e
    

    and add curl command

    10 15 * * * /usr/bin/curl --silent http://test.com?some=crontab &>/dev/null
    

    every day 10:15 you will send html GET request to http://test.com with param "some" and value "crontab"

提交回复
热议问题