running a php task every 24 hours

前端 未结 4 1147
孤独总比滥情好
孤独总比滥情好 2021-01-05 07:22

I have some functions that use curl to pull information off a couple of sites and insert them into my database. I was just wondering what is the best way to go about executi

4条回答
  •  情书的邮戳
    2021-01-05 08:03

    This is exactly what Cron (linux) or Scheduled Tasks (windows) are for.

    You can run them on your application server to keep everything in one place.

    For example, I have a cron running on my home server to backup its MySQL databases every day. Only one system is involved in this process.

提交回复
热议问题