0

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?

lingo
  • 1,848
  • 6
  • 28
  • 56

2 Answers2

1

Your daily event should check that table and run its code if today's date is in it !

Louis
  • 2,854
  • 2
  • 19
  • 24
0

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

Community
  • 1
  • 1
Ramalingam Perumal
  • 1,367
  • 2
  • 17
  • 46