dist/monitor-all.js
function(params, callback) {
      var t = this,
          error = null;
      if (!t.get('started')) {
        error = {code:'NOT_RUNNING', msg:'Cannot run - recipe not started.'};
        logger.warn(error);
        return callback(error);
      }

      // Name the probe
      t.name = t.get('probeName') || t.get('id');

      // Build a context to pass onto the script.  The context contains
      // a console, a logger, and each monitor by name.
      if (!t.context) {
        t.context = vm ? vm.createContext({}) : {};
        t.context.console = console;
        t.context.logger = Monitor.getLogger('Recipe.run.' + t.name);
        for (var monitorName in t.monitors) {
          t.context[monitorName] = t.monitors[monitorName];
        }
      }

      // Run the script
      try {
        t.run(t.context);
      } catch(e) {
        error = "Error running script: " + e.toString();
        logger.error('run_control', error);
      }
      callback(error);
    }
function(params, callback) {
      var t = this,
          error = null;
      if (!t.get('started')) {
        error = {code:'NOT_RUNNING', msg:'Cannot run - recipe not started.'};
        logger.warn(error);
        return callback(error);
      }

      // Name the probe
      t.name = t.get('probeName') || t.get('id');

      // Build a context to pass onto the script.  The context contains
      // a console, a logger, and each monitor by name.
      if (!t.context) {
        t.context = vm ? vm.createContext({}) : {};
        t.context.console = console;
        t.context.logger = Monitor.getLogger('Recipe.run.' + t.name);
        for (var monitorName in t.monitors) {
          t.context[monitorName] = t.monitors[monitorName];
        }
      }

      // Run the script
      try {
        t.run(t.context);
      } catch(e) {
        error = "Error running script: " + e.toString();
        logger.error('run_control', error);
      }
      callback(error);
    }
function ( params , callback ) { var t = this , error = null ; if ( ! t . get ( 'started' ) ) { error = { code : 'NOT_RUNNING' , msg : 'Cannot run - recipe not started.' } ; logger . warn ( error ) ; return callback ( error ) ; } // Name the probe t . name = t . get ( 'probeName' ) || t . get ( 'id' ) ; // Build a context to pass onto the script.  The context contains // a console, a logger, and each monitor by name. if ( ! t . context ) { t . context = vm ? vm . createContext ( { } ) : { } ; t . context . console = console ; t . context . logger = Monitor . getLogger ( 'Recipe.run.' + t . name ) ; for ( var monitorName in t . monitors ) { t . context [ monitorName ] = t . monitors [ monitorName ] ; } } // Run the script try { t . run ( t . context ) ; } catch ( e ) { error = "Error running script: " + e . toString ( ) ; logger . error ( 'run_control' , error ) ; } callback ( error ) ; }
Run the recipe script

This manually runs a started recipe.  The callback is called immediately
after executing the script.

@method run_control
Run the recipe script