Jupyter notebook to fire event on note book open from jupyter yaml hook

I need to execute a script on every time user opens a notebook setting up values. Can you let me know it can be achieved. Is there any event that I can set in jupyter yaml (or) from custom.js?