Event creates successfully but does not run

[expired user #10153]'s profile image [expired user #10153] posted 7 years ago in General Permalink

I have created an event to run a simple update query. It was copied and pasted and tested so I know the syntax is correct for the execution body of the event. However, it is still not completing the scheduled task.

The creation code is:

CREATE DEFINER=`xxxxxxxxxxxx`@`%` EVENT `myevent`
        EVERY 1 SECOND STARTS '2016-10-02 05:15:09'
    COMMENT ''
    DO UPDATE xxxxxxxxx.StatsMaintained SET Value=Value+1 WHERE Value>0

Any idea as to why this occurs with no errors whatsoever? Am I not understanding how an event should be used?

ansgar's profile image ansgar posted 7 years ago Permalink

Look at Host > Processes, and watch out whether the process with the user "event_scheduler" is running. If not, you may need to activate the server variable event_scheduler:

SET @@global.event_scheduler = 'ON';
[expired user #10153]'s profile image [expired user #10153] posted 7 years ago Permalink

I'll try that, thanks!

[expired user #10153]'s profile image [expired user #10153] posted 7 years ago Permalink

Only the process with my username was running, so it was likely the problem. I'll confirm once I acquire permissions to turn it on.

Joe's profile image Joe posted 1 month ago Permalink

Oh, thank you mutch. I found self by handbook. On my old server this global variable was off. On my new Server was this always on. I´m learned something ;-) Bye:joe

Please login to leave a reply, or register at first.