Executes the Ant task.
193231
@Override
    public void execute() {
        logger = new DITAOTAntLogger(getProject());
        logger.info(message);

        //ensure outdir is absolute
        if (!new File(outputdir).isAbsolute()) {
            outputdir = new File(basedir, outputdir).getAbsolutePath();
        }

        //initialize language map
        createLangMap();
        //initialize entity map
        createEntityMap();
        //Initialize entitye exceptions
        entityExceptionSet = new HashSet<>(128);
        //initialize charset map
        createCharsetMap();
        //change charset of html files
        convertHtmlCharset();
        //update entity and lang code
        updateAllEntitiesAndLangs();
    }
304205
public function execute()
    {
        $this->prepareExecute();

        // @event onBeforeExecute

        // Perform application routines.
        $response = $this->doExecute();

        // @event onAfterExecute

        $this->postExecute();

        // @event onBeforeRespond

        $this->server->getOutput()->respond($response);
        // @event onAfterRespond
    }
729200
@Override
    public void execute() throws BuildException {
        initialize();

        final Job job = getJob(tempDir, getProject());
        try {
            for (final ModuleElem m : modules) {
                m.setProject(getProject());
                m.setLocation(getLocation());
                final PipelineHashIO pipelineInput = new PipelineHashIO();
                for (final Map.Entry<String, String> e : attrs.entrySet()) {
                    pipelineInput.setAttribute(e.getKey(), e.getValue());
                }
                AbstractPipelineModule mod = getPipelineModule(m, pipelineInput);
                long start = System.currentTimeMillis();
                mod.setLogger(logger);
                mod.setJob(job);
                mod.execute(pipelineInput);
                long end = System.currentTimeMillis();
                logger.debug("{0} processing took {1} ms", mod.getClass().getSimpleName(), end - start);
            }
        } catch (final DITAOTException e) {
            throw new BuildException("Failed to run pipeline: " + e.getMessage(), e);
        }
    }
308533
public function execute() {
		$tasks = array();
		$this->TaskServer->killZombies();
		while ($this->TaskServer->freeSlots() > 0 && ($task = $this->TaskServer->getPending())) {
			$tasks[] = $task;
		}

		if (empty($tasks)) {
			return;
		}

		$events = (array)Configure::read('Task.processEvents');
		
		$models = array();
		foreach ($events as $event) {
			$models[$event['model']] = ClassRegistry::init($event['model']);
			CakeEventManager::instance()->attach($models[$event['model']], $event['key'], $event['options']);
		}

		foreach ($tasks as $task) {
			$this->_run($task);
		}

		foreach ($events as $event) {
			CakeEventManager::instance()->detach($models[$event['model']], $event['key'], $event['options']);
		}
	}
1250495
public function executed()
    {
        $this->setLastRun(new \DateTime());
        if (!$this->getModify()) {
            $this->setStatus(self::STATUS_DISABLED);
        }
        if ($this->getStatus() == self::STATUS_ENABLED) {
            // find near time task launch
            $next_run = $this->getNextRun();
            do {
                // failed to compute time of next run
                if ($next_run->modify($this->getModify()) === false) {
                    $this->setModify('');
                    $this->setStatus(self::STATUS_DISABLED);
                    break;
                }
            } while ($next_run->getTimestamp() <= time());
            $this->setNextRun($next_run);
        }
    }
65425
@Override
    public void execute() {
        logger = new DITAOTAntLogger(getProject());
        logger.info(message);

        new Properties();
        //ensure tempdir is absolute
        if (!tempdir.isAbsolute()) {
            tempdir = new File(basedir, tempdir.getPath()).getAbsoluteFile();
        }
        //ensure outdir is absolute
        if (!outputdir.isAbsolute()) {
            outputdir = new File(basedir, outputdir.getPath()).getAbsoluteFile();
        }
        //ensure inputmap is absolute
        if (!new File(inputmap).isAbsolute()) {
            inputmap = new File(tempdir, inputmap).getAbsolutePath();
        }

        final Job job = getJob(tempdir, getProject());

        final LangParser parser = new LangParser();

        try {

            final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
            final SAXParser saxParser = saxParserFactory.newSAXParser();
            //parse the user input file(usually a map)
            saxParser.parse(inputmap, parser);
            String langCode = parser.getLangCode();
            if (!StringUtils.isEmptyString(langCode)) {
                setActiveProjectProperty("htmlhelp.locale", langCode);
            } else {
                //parse topic files
                for (final FileInfo f: job.getFileInfo()) {
                    if (ATTR_FORMAT_VALUE_DITA.equals(f.format)) {
                        final File topicFile = new File(tempdir, f.file.getPath());
                        if (topicFile.exists()) {
                            saxParser.parse(topicFile, parser);
                            langCode = parser.getLangCode();
                            if (!StringUtils.isEmptyString(langCode)) {
                                setActiveProjectProperty("htmlhelp.locale", langCode);
                                break;
                            }
                        }
                    }
                }
                //no lang is set
                if (StringUtils.isEmptyString(langCode)) {
                    //use default lang code
                    setActiveProjectProperty("htmlhelp.locale", "en-us");
                }
            }



        } catch (final Exception e) {
            /* Since an exception is used to stop parsing when the search
             * is successful, catch the exception.
             */
            if (e.getMessage() != null &&
                    e.getMessage().equals("Search finished")) {
                System.out.println("Lang search finished");
            } else {
                e.printStackTrace();
            }
        }
    }
413997
public function execute()
	{
		// Incoming task
		$this->_task = strtolower(Request::getCmd('task', ''));

		$doTask = null;

		// Check if the default task is set
		if (!$this->_task)
		{
			if (isset($this->_taskMap['__default']))
			{
				$doTask = $this->_taskMap['__default'];
			}
		}
		// Check if the task is in the taskMap
		else if (isset($this->_taskMap[$this->_task]))
		{
			$doTask = $this->_taskMap[$this->_task];
		}

		// Raise an error (hopefully, this shouldn't happen)
		if (!$doTask)
		{
			throw new InvalidTaskException(Lang::txt('JLIB_APPLICATION_ERROR_TASK_NOT_FOUND', $this->_task), 404);
		}

		// Record the actual task being fired
		$doTask .= 'Task';

		// Call the task
		$this->$doTask();
	}
445595
def run(self):
        """"""
        self.exc = None
        try:
            self.task()
        except BaseException:
            self.exc = sys.exc_info()
4498
public function execute(): void
	{
		$migrations = $this->getOutstanding();

		if(empty($migrations))
		{
			$this->write('<blue>There are no outstanding migrations.</blue>');

			return;
		}

		$batch = $this->builder()->max('batch') + 1;

		foreach($migrations as $migration)
		{
			$this->runMigration($migration, 'up', $batch);
		}

		$this->write('Ran the following migrations:' . PHP_EOL);

		$this->outputMigrationList($migrations);
	}
730848
public void execute() {
    Entry head;
    synchronized(this) {
      head = this.head;
      this.head = null;
    }
    while (head != null) {
      try {
        head.runnable.run();
      } catch (Throwable t) {
        platform.reportError("Failure executing runnable: " + head.runnable, t);
      }
      head = head.next;
    }
  }
1330379
def execute(self, data):
        """"""
        if Crawl.is_aborted(self.crawler, self.run_id):
            return

        try:
            Crawl.operation_start(self.crawler, self.stage, self.run_id)
            self.log.info('[%s->%s(%s)]: %s',
                          self.crawler.name,
                          self.stage.name,
                          self.stage.method_name,
                          self.run_id)
            return self.stage.method(self, data)
        except Exception as exc:
            self.emit_exception(exc)
        finally:
            Crawl.operation_end(self.crawler, self.run_id)
            shutil.rmtree(self.work_path)
476421
public function execute() {
        if (!count($this->config['files'])) {
            return;
        }
        
        if (isset($_POST) && count($_POST) > 0) {
            $this->createFiles();
            $this->returnZipFile();
        } else {
            echo $this->renderInputForm();
        }
    }
1032010
protected function _execute()
    {
        if (!$this->enabled() && !$this->focused()) {
            return;
        }
        foreach ($this->_children as $child) {
            if ($this->suite()->failfast()) {
                break;
            }
            $this->_passed = $child->process() && $this->_passed;
        }
    }
586378
def execute(self):
    

    jvm_resolve_subsystem = JvmResolveSubsystem.global_instance()
    if jvm_resolve_subsystem.get_options().resolver != 'coursier':
      return

    # executor = self.create_java_executor()
    classpath_products = self.context.products.get_data('compile_classpath',
                                                        init_func=ClasspathProducts.init_func(
                                                          self.get_options().pants_workdir))
    executor = self.create_java_executor()
    self.resolve(self.context.targets(), classpath_products, sources=False, javadoc=False, executor=executor)
412360
@Override
    public void execute() {
        for (Task t : tasks) {
            if (t instanceof UnknownElement) {
                t.maybeConfigure();
                Object proxy = ((UnknownElement) t).getWrapper().getProxy();
                if (proxy instanceof AbstractTaskElement) {
                    ((AbstractTaskElement) proxy).setExpect(expect);
                }
            }
        }
        super.execute();
    }
1076426
@Override
    public void run() {

        try {

            // Set up
            Path path = FileSystems.getDefault().getPath(this.path);
            watcher = FileSystems.getDefault().newWatchService();
            Scanner.start(path, watcher);

            while (true) {

                // Reload when notified
                synchronized (this) {
                    this.wait();
                }

                // Keep reloading until all changes have notified:
                while (reloadRequested) {
                    reloadRequested = false;
                    Reflections reflections = ClassFinder.newReflections();
                    ApiHandler.setupApi(reflections);
                    Main.mainHandler.setupFilters(reflections);
                    Main.mainHandler.runStartups(reflections);
                }

            }

        } catch (IOException | InterruptedException e) {
            try {
                shutdown();
                throw new RuntimeException("Error in " + ClassReloader.class.getSimpleName() + ", exiting.", e);
            } catch (IOException e1) {
                e.printStackTrace();
            }
        }

    }
1256194
public function execute()
    {
        $queue = P\queue();

        while ($this->handles || !$queue->isEmpty()) {
            // If there are no transfers, then sleep for the next delay
            if (!$this->active && $this->delays) {
                usleep($this->timeToNext());
            }
            $this->tick();
        }
    }