deleteEvent function not removing event from

I’m using scheduler.deleteEvent(event_id) but it’s not removing event from calendar.

Be sure that you are using correct id
In which moment you are calling deleteEvent method ?

I retrieve id from onBeforeEventDelete function and passed it scheduler.deleteEvent function but it’s not removing event from scheduler.

deleteEvent method call onBeforeEventDelete event. And this event must return true, in the other case the event won’t be deleted.