DEV Community

Michael
Michael

Posted on • Originally published at gbase.cn

Managing the Event Scheduler in GBase 8a

The event scheduler (event_scheduler) is the built‑in daemon thread in GBase 8a that runs timed events — think of it as your cron inside the database. It's on by default, and you must have it enabled if you plan to create any scheduled tasks. Here's how to check, start, and stop it in your gbase database.

Checking the Scheduler Status

SHOW VARIABLES LIKE '%event_scheduler%';
Enter fullscreen mode Exit fullscreen mode

If the output shows ON, the scheduler is active and monitoring events.

Enabling the Event Scheduler

Via SQL

SET GLOBAL event_scheduler = ON;
-- or using the session variable syntax
SET @@global.event_scheduler = ON;
-- 1 also means ON
SET GLOBAL event_scheduler = 1;
Enter fullscreen mode Exit fullscreen mode

Via Configuration File

Add the following line under the [gbased] section in gbase_8a_gcluster.cnf:

event_scheduler = 1    # or ON
Enter fullscreen mode Exit fullscreen mode

After enabling, run SHOW PROCESSLIST — you'll see a thread with User: event_scheduler and State: Waiting for event lock, confirming the scheduler is alive.

Disabling the Event Scheduler

Via SQL

SET GLOBAL event_scheduler = OFF;
SET @@global.event_scheduler = 0;
-- 0 and OFF are equivalent
Enter fullscreen mode Exit fullscreen mode

Via Configuration File

In gbase_8a_gbase.cnf, set:

event_scheduler = 0    # or OFF / DISABLED
Enter fullscreen mode Exit fullscreen mode

The scheduler thread disappears from the process list immediately, and all recurring or one‑time events will no longer fire.

Controlling the event scheduler lets you safely pause automation during maintenance windows and resume it when the system is stable — a simple but essential tuning knob for anyone managing a GBASE MPP cluster.

Top comments (0)