Got onreceive to work. Actions are now executed on the correct set time.
Merged with Nathans changes.