在Wordpress中运行预定的PHP脚本以在MySQL中保存数据

I have a php script that I want to run every day to persist some data in the database. What is the easiest way to achieve this ?

Does Wordpress provide some kind of scheduler event that can run some php code at a given time ? Or is creating a scheduled event in the MySQL database the correct way ?

Thank you.

If you're running on a Unix system I would recommend using cronjobs.

If you're running on Windows please take a look at this SO thread: What is the Windows version of cron?.