You can check and print what is working.
My script is working on 0.3.7, 0.4 have no much changes.
Maybe some functions need to be changed to be suitable for your 0.4
Add print code at onTime function and check what is happened.
Also check if there is any error in console.
Btw i remeber Function onTime was onTimer at 0.4?
Try that.
I just gave you an idea how it could be