client/splunk.js
function(options, callback) {
            if (!callback && utils.isFunction(options)) {
                callback = options;
                options = {};
            }
            
            callback = callback || function() {};
            options = options || {};
            
            var that = this;
            var req = this.post("dispatch", options, function(err, response) {
                if (err) {
                    callback(err);
                    return;
                }
                
                var sid = response.data.sid;
                var job = new root.Job(that.service, sid, that.namespace);
                
                callback(null, job, that);
            });
            
            return req;
        }
function(options, callback) {
            if (!callback && utils.isFunction(options)) {
                callback = options;
                options = {};
            }
            
            callback = callback || function() {};
            options = options || {};
            
            var that = this;
            var req = this.post("dispatch", options, function(err, response) {
                if (err) {
                    callback(err);
                    return;
                }
                
                var sid = response.data.sid;
                var job = new root.Job(that.service, sid, that.namespace);
                
                callback(null, job, that);
            });
            
            return req;
        }
function ( options , callback ) { if ( ! callback && utils . isFunction ( options ) ) { callback = options ; options = { } ; } callback = callback || function ( ) { } ; options = options || { } ; var that = this ; var req = this . post ( "dispatch" , options , function ( err , response ) { if ( err ) { callback ( err ) ; return ; } var sid = response . data . sid ; var job = new root . Job ( that . service , sid , that . namespace ) ; callback ( null , job , that ) ; } ) ; return req ; }
Dispatches a saved search, which creates a search job and returns a
`splunkjs.Service.Job` instance in the callback function.

@example

var savedSearch = service.savedSearches().item("MySavedSearch");
savedSearch.dispatch({force_dispatch: false}, function(err, job, savedSearch) {
console.log("Job SID: ", job.sid);
});

@param {Object} options The options for dispatching this saved search:
- `dispatch.now` (_string_): The time that is used to dispatch the search as though the specified time were the current time.
- `dispatch.*` (_string_): Overwrites the value of the search field specified in *.
- `trigger_actions` (_boolean_): Indicates whether to trigger alert actions.
- `force_dispatch` (_boolean_): Indicates whether to start a new search if another instance of this search is already running.
@param {Function} callback A function to call when the saved search is dispatched: `(err, job, savedSearch)`.

@endpoint saved/searches/{name}/dispatch
@method splunkjs.Service.SavedSearch
Dispatches a saved search which creates a search job and returns a splunkjs . Service . Job instance in the callback function .