According to this page:
NetSuite Applications Suite - Script Execution Time Limits (oracle.com)
A scheduled script should be able to run for 3600 seconds = 1 hour
I have a complicated search that I am unable to run in a Suitelet because it kept timing out (Suitelets are listed at 300 seconds = 5 minutes).
However, my Scheduled Script is also timing out. Looking at the error in detail, it is:
{"type":"error.SuiteScriptError","name":"ABORT_SEARCH_EXCEEDED_MAX_TIME","message":"This search has timed out. You can choose to schedule it to run in the background and have the results emailed to you when complete. On the saved search form, click the \"Email\" tab, check \"Send According to Schedule\", choose an email address on the \"Specific Recipients\" subtab and a recurrence pattern on the \"Schedule\" subtab.","stack":["createError(N/error)","execute(/SuiteScripts/ManagementAccountsKPI22Email.js:4325)"],"cause":{"type":"internal error","code":"ABORT_SEARCH_EXCEEDED_MAX_TIME","details":"This search has timed out. You can choose to schedule it to run in the background and have the results emailed to you when complete. On the saved search form, click the \"Email\" tab, check \"Send According to Schedule\", choose an email address on the \"Specific Recipients\" subtab and a recurrence pattern on the \"Schedule\" subtab.","userEvent":null,"stackTrace":["createError(N/error)","execute(/SuiteScripts/ManagementAccountsKPI22Email.js:4325)"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":false}
I see that this is actually the Search (within the script) that is timing out. Am I limited to searches timing out at 5 minutes even on a Scheduled Script? How do I get a more complex search to run in a script?
If the answer is Map/Reduce - do you have a link to any documentation explaining how these are meant to be used (as I've looked at these in the past, but struggled to grasp the concept).