Suppose my database has a table with two fields
What I want to achieve is to automatically insert a piece of data into the database at 24:00 every day
For example, it turns out that
id=1
pv=0
I want to automatically insert one at 0 o'clock every day
id=2
pv=0
will automatically insert one
id=3
pv=0
will automatically insert one
id=4
pv=0
Does anyone understand this?
给我你的怀抱2017-06-23 09:14:06
Method 1: Use mysql event to create a scheduled task
Reference: https://blog.codefun.cn/blog/...
Method 2: Use the scheduled task that comes with the operating system to execute the php script regularly
Method 3: Use nodejs or java or others which all come with scheduled tasks