Having issue with running onready script in published site!

Show me the code (and I think you are running into the “timing” problem. Using the html-comp, aren´t you?). Have you read my article about it (https://girizano.wixsite.com/codecorner/home/html-component-not-running-in-publish-mode-google-sheets-example)?