Tell me how to make a periodic SQL query, say, to be executed once a day?

  • thanks - you can answer, I will choose as the correct answer - platinumsemen
  • @Semen Savenko, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - ReinRaus
  • I know how to choose the right answer - but the speaker just wrote it in a comment - platinumsemen
  • @Seven Savenko, a comment about the check mark next to the answer was written after I converted the comment into an answer, so that the message fell on your soap and you entered the question :) - ReinRaus

2 answers 2

Cron to help .

    To do this, you can use the MySQL event mechanism (EVENT)

    CREATE EVENT `myevent` ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO UPDATE tbl SET tiq = tiq + 1;