Don't know if there is python-gobject available for jolla, but you could try something similar to my dbus-listener that does stuff when an alarm goes off on the N9.