lingo
lingo

Reputation: 1908

MySQL event schedule from another table's dates

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

Answers (2)

Ramalingam Perumal
Ramalingam Perumal

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

Louis
Louis

Reputation: 2890

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

Upvotes: 1

Related Questions