Hitoshi Ozawa
Giga Sage

I've tried to put a delay in the script but found it doesn't work too well.

The solution I ended up doing was not to put a delay but to create a scheduled job that'll create an event to trigger an action after a duration.