Domanda

I want to run a query statement 10 times per day. I know I should use event scheduler like

CREATE EVENT event_name
  ON SCHEULE
    EVERY 1 DAY
    STARTS (TIMESTAMP(CURRENT_DATE) + INTERVAL 1 DAY + INTERVAL 1 HOUR)
  DO
    # Your query

But How can I run it 10 times per day? Thx

È stato utile?

Soluzione

CREATE EVENT event_name
  ON SCHEDULE
    EVERY 144 MINUTE
    STARTS (TIMESTAMP(CURRENT_DATE) + INTERVAL 1 DAY + INTERVAL 1 HOUR)
  DO
    # Your query

for 10 times in a day you can set like this means (24/10)=2.4 & (2.4*60)=144 minutes so it will execute 10 times in a day

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top