forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature](Job)Support Event Scheduler Job
- Loading branch information
1 parent
eb134d9
commit d26a6e6
Showing
33 changed files
with
1,038 additions
and
454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
```sql | ||
CREATE | ||
[DEFINER = user] | ||
EVENT | ||
event_name | ||
ON SCHEDULE schedule | ||
[COMMENT 'string'] | ||
DO event_body; | ||
|
||
schedule: { | ||
AT timestamp | ||
| EVERY interval | ||
[STARTS timestamp ] | ||
[ENDS timestamp ] | ||
} | ||
|
||
interval: | ||
quantity { DAY | HOUR | MINUTE | | ||
WEEK | SECOND } | ||
``` | ||
|
||
eg: | ||
```sql | ||
CREATE | ||
EVENT e_daily | ||
ON SCHEDULE | ||
EVERY 1 DAY | ||
STARTS '2011-11-17 23:59:00' | ||
ENDS '2038-01-19 03:14:07' | ||
COMMENT 'Saves total number of sessions' | ||
DO | ||
INSERT INTO site_activity.totals (time, total) | ||
SELECT CURRENT_TIMESTAMP, COUNT(*) | ||
FROM site_activity.sessions; | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.