Application Framework Reference

Splunk API

getMaxTime()

The getMaxTime() method gets the maxTime setting for a search, the number of seconds to run the search before finalizing.

Synopsis

maxTime = getMaxTime()

Return Value

Integer

Maximum time that the current context search job should run, in seconds.

Example

var context = this.getContext();var search  = context.get("search");
var maxTime = search.getMaxTime();
if (maxTime > 300) {
    alert('maxTime value seems high');
} else {
    alert('maxTime value seems about right');
}
 

See Also

getMaxCount()
getMaxEvents()
getMinimumStatusBuckets()
setMaxCount()
setMaxEvents()
setMaxTime()
setMinimumStatusBuckets()
Splunk.Context