I want to link 2 spreadsheets with importrange let's say A with B. B is the source. I want A to import numbers from B every 6 hours, because the numbers in B are constantly moving and since the sheet is really big, it would slow down sheet A. So therefore, I want it to only import every 6 hours. Is there a way to do that? 
Google Sheets importrange every x hours
google spreadsheets
The IMPORTRANGE function does not seem to cache its results, so it will refresh whenever the source spreadsheet changes.But we can circumvent this by writing our own function:function customImportRange(spreadsheetUrl, rangeStr, timestamp) {  var sheet = SpreadsheetApp.openByUrl(spreadsheetUrl);  var range = sheet.getRange(rangeStr);  return range.getValues();}Install this function by clicking Tools → Editor, paste the code, and click the Run button. This will popup a dialog asking you to give the script permission to run.The script does exactly the same as IMPORTRANGE, but, being a Google Apps Scripts function, Google Spreadsheets will cache its results, and not fetch any new data as long as the parameters to the function are unchanged.That means that we can change the timestamp parameter every 6 hours to trigger a refetch, which again means that we need a formula that generates a new value every 6 hours.Given that we put =NOW() in cell B1, and the following formula in cell C1:=DATEVALUE(B1) * 10 + ROUNDUP(HOUR(B1) / 6)Cell C1 now displays a number that changes every 6 hours, meaning we can use it as input to our function. Put the following in cell A2:=customImportRange(https://docs.google.com/spreadsheets/d/1qFryUlGfGT8dp_lx9sSE_7suCV0t8cAg9btM1AOPnSI/edit#gid=0, 'Custom function'!A4:F6, C1)The parameters are:The full URL to the source spreadsheetThe range notation for the data you want to fetchThe cache keyI have put up an example spreadsheet to demonstrate this, feel free to copy it for your own experimentation.To have the spreadsheet update also when it is not opened in a browser, you should go to File → Spreadsheet settings and set Recalculation to On change and every hour.