Doing something is always better than nothing.
Hey folks,
If you want to give formula like =Mod((G9-E9),1)*24) in google app script than give it in below way.
var row=e.range.getRow();
e.source.getActiveSheet().getRange(row,9).setFormula("=Mod((G" + (row)+ "-F" + (row) + "),1)*24" );
Cheers.
TJ