0

I want to update every minute a cell with data from a HTML link. The problem is that the value does not update unless I manually empty the cell or make changes to the script. I tried to add NOW() to the script but the cells do not update. I do not know much about JavaScript. Could someone explain to me what and where in the script I should add or change something?

This is my script:

function DataFromDomoticz() {
  var now = new Date();
 SpreadsheetApp.getActive().getSheetByName('LUCHTVOCHTIGHEID_V2').getRange('A1').setValue(now);
 SpreadsheetApp.getActive().getSheetByName('LUCHTVOCHTIGHEID_V2').getRange('I2').setValue('=ImportJSONBasicAuth("http://*****:8080/json.htm?type=devices&rid=68";"**";"**";"/result")');     
  • it is not updating after 30 minutes – Coen17st Jan 18 at 15:36
0
  • go to File
  • select Spreadsheet settings...
  • change recalculation like this:

9

  • you can test it with this formula:

=IF(SECOND(NOW())={00;01;02;03;04;05;06;07;08;09;
                   10;11;12;13;14;15;16;17;18;19;
                   20;21;22;23;24;25;26;27;28;29;
                   30;31;32;33;34;35;36;37;38;39;
                   40;41;42;43;44;45;46;47;48;49;
                   50;51;52;53;54;55;56;57;58;59}, RAND(), RAND())

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.