Reputation: 1908
Is it possible to run MySQL event based on dates stored in table?
For example if I have table like
| id | date |
|----|------------|
| 1 | 2016-05-20 |
| 2 | 2016-05-25 |
| 3 | 2016-06-15 |
...
can I run event automatically at 2016-05-20, 2016-05-25 and 2016-06-15?
Upvotes: 0
Views: 60
Reputation: 1427
Yes, It's possible to run event automatically at 2016-05-20, 2016-05-25 and 2016-06-15 dates by using cron-job
.
You can run daily event, check with your table date and run its code.
Suppose you want to automatically run your script file at some dates, you need to set cron-job
using php. Ref How to create cron job using PHP
Upvotes: 0
Reputation: 2890
Your daily event should check that table and run its code if today's date is in it !
Upvotes: 1