I am trying to push the page layouts(html page layouts) from SharePoint hosted app to host web. I am able to push the html page layout. My intention is to create a page dynamically by attaching this newly pushed page layout. I think when we create a page, it is expecting .aspx page layout needs to be presented. But, unfortunately when page is being created, .aspx page layout is not ready(which should come from html page layout). Is there a way to say convert this html page layout immediately to aspx page layout using JSOM? But If i wait for, 5-10mins, then .aspx page layout is getting created with html page layout
Nope, you can't trigger the process or speed it up. There's an event receiver on the master page gallery that performs the conversion. That said, 5-10 minutes seems like a really long time.
One workaround I can suggest is to forget about HTML page layouts (they suck anyway) and just push the page layout as an *.aspx directly. Then you won't have to wait for the backend process.