Not sure I understand "my on database" but the way to execute IR codes is using Widget.executeActions() or Widget.scheduleActions() as you are doing in your script.
See the Dev Guide for explicit examples and a search of the forum for executeActions or scheduleActions will also turn up quite a few examples.