Run the job.

@return bool
190348
public function run()
    {
        // If the truthTest failed, don't run
        if ($this->truthTest !== true) {
            return false;
        }

        // If overlapping, don't run
        if ($this->isOverlapping()) {
            return false;
        }

        // Write lock file if necessary
        $this->createLockFile();

        // Call before if required
        if (is_callable($this->before)) {
            call_user_func($this->before);
        }

        // If command is callable...
        if (is_callable($this->command)) {
            $this->output = $this->exec();
        } else {
            $args = \is_string($this->args) ? $this->args : implode(' ', $this->args);
            $command = $this->command . ' ' . $args;
            $process = new Process($command);

            $this->process = $process;

            if ($this->runInBackground()) {
                $process->start();
            } else {
                $process->run();
                $this->finalize();
            }
        }

        return true;
    }
1206674
public function run()
    {
        
        if (!empty($this->request)) {
            foreach ($this->request as $key => $value) {
                $this->_iterate($key, $value);
            }
        }
         
        return $this->getReport();
    }
1136977
public function run()
    {
        $topdir = $this->getBasePath();

        foreach (scandir($topdir) as $filename) {

            // Skip directory link files
            if (($filename == '.') || ($filename == '..')) {
                continue;
            }

            if (is_dir($topdir . DIRECTORY_SEPARATOR . $filename)) {
                // Recurse into lower level directory, providing the namespace
                $this->loadFiles($filename, $filename);
            }
        }
    }
755322
public function run()
    {
        $now = time();

        if ($this->remainingCoolDown() > 0) {
            return false;
        }

        $this->cache->forever($this->cacheKey, $now);

        $counter = 0;
        foreach ($this->jobs as $name => $jobBag) {
            $job = $this->getOrMake($name);

            $key = $this->makeCacheKey($name);

            $executed = null;
            if ($this->cache->has($key)) {
                $executed = $this->cache->get($key);

                if ($now - $executed < $job->getInterval() * 60) {
                    continue;
                }
            }

            if ($job->getActive()) {
                $now = time();

                $job->run($executed);
                $this->cache->forever($key, $now);
                $counter++;
            }
        }

        return $counter;
    }
445241
public function run()
    {
        $prefix = $this->notifyPrefix;
        
        $this->addNotification($prefix.'_start_run_tasks');
        
        foreach ($this->runSteps as $actionName => $stepInfos) {
            $context = null;
            if ($stepInfos->context !== null) {
                $context = $stepInfos->context;
            }
            
            if ($stepInfos->callback === null) {
                $this->addNotification($prefix.'_exec_'.$actionName, $context);
                continue;
            }
            
            $this->addNotification($prefix.'_run_'.$actionName, $context);

            if (is_callable($stepInfos->callback)) {
                $callback = $stepInfos->callback;
                $callback();
            }

            $this->addNotification($prefix.'_done_'.$actionName, $context);
        }
        
        $this->addNotification($prefix.'_end_run_tasks');
    }
1070879
public function run(): bool
    {
        if ($this->startup) {
            $this->logger->debug('Calling startup callback');
            call_user_func($this->startup, $this);
        }

        $actions = implode(', ', array_keys($this->callbacks));
        $this->logger->info("Component running with callbacks for $actions");
        $this->executor->execute(
            $this->apiFactory,
            $this->input,
            $this->callbacks,
            $this->error
        );

        if ($this->shutdown) {
            $this->logger->debug('Calling shutdown callback');
            call_user_func($this->shutdown, $this);
        }

        return true;
    }
447618
public function run()
	{
		$this->say('Building component');

		// Analyize extension structure
		$this->analyze();

		// Prepare directories
		$this->prepareDirectories();

		if ($this->hasAdmin)
		{
			$adminFiles = $this->copyTarget($this->adminPath, $this->getBuildFolder() . "/administrator/components/com_" . $this->getExtensionName());

			$this->addFiles('backend', $adminFiles);
		}

		if ($this->hasFront)
		{
			$frontendFiles = $this->copyTarget($this->frontPath, $this->getBuildFolder() . "/components/com_" . $this->getExtensionName());

			$this->addFiles('frontend', $frontendFiles);
		}

		// Build media (relative path)
		$media = $this->buildMedia("media/com_" . $this->getExtensionName());
		$media->run();

		$this->addFiles('media', $media->getResultFiles());

		$language = $this->buildLanguage("com_matukio");
		$language->run();

		return true;
	}
804435
public function Run()
    {
        $bSuccess = false;

        set_time_limit(1800);
        TCacheManager::SetDisableCaching(true);
        TCacheManagerRuntimeCache::SetEnableAutoCaching(false);
        if ($this->Prepare()) {
            $bSuccess = $this->Perform();
        }
        $this->Cleanup($bSuccess);
        TCacheManager::SetDisableCaching(false);
        TCacheManagerRuntimeCache::SetEnableAutoCaching(true);

        return $bSuccess;
    }
689651
function run() {
		$this->scheduled = false; ++$this->tries; $progress = 0;
		while ( ! $this->finished() ) {
			if ( $this->ready() && $this->run_next_step() ) {
				$progress++;
			} else {
				$this->schedule();
				return $progress;
			}
		}
		return true;
	}
351034
public function run() {

		$categories = $this->getItems();

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

		return $this->renderFile($this->template, [
        	'data' => [
        		'categories' => $categories,
            	'active_id' => $this->active_id,
            ],
		]);
	}
1293252
public function run()
	{
		$container = $this->createContainer();

		$files = $this->export( $container );
		$this->createSitemapIndex( $container, $files );

		$container->close();
	}
961796
public function run()
    {
        $this->config->setParams($this->buildParams($this->config));

        $parentId = $this->getParentId();

        $request = $this->firstPage($this->config);
        while ($request !== false) {
            $response = $this->download($request);

            $responseHash = sha1(serialize($response));
            if ($responseHash == $this->lastResponseHash) {
                $this->logger->debug(sprintf(
                    "Job '%s' finished when last response matched the previous!",
                    $this->getJobId()
                ));
                $this->scroller->reset();
                break;
            } else {
                $data = $this->runResponseModules($response, $this->config);
                $data = $this->filterResponse($this->config, $data);
                $this->parse($data, $parentId);

                $this->lastResponseHash = $responseHash;
            }

            $request = $this->nextPage($this->config, $response, $data);
        }
    }
1318385
public function run()
	{
		$this->say('Mapping ' . $this->getJConfig()->extension . " to " . $this->target);
		$this->say('OS: ' . $this->getOs() . " | Basedir: " . $this->getSourceFolder());

		if (!$this->checkFolders())
		{
			return false;
		}

		$dirHandle = opendir($this->getSourceFolder());

		// Get all main dirs
		while (false !== ($element = readdir($dirHandle)))
		{
			if (substr($element, 0, 1) == '.')
			{
				continue;
			}

			$method = 'process' . ucfirst($element);

			if (method_exists($this, $method))
			{
				$this->$method($this->getSourceFolder() . "/" . $element, $this->target);
			}
			else
			{
				$this->say('Missing method: ' . $method);
			}
		}

		closedir($dirHandle);

		$this->say("Finished symlinking into Joomla!");

		return true;
	}
1243947
public function run()
    {
        $vendorDir = dirname(dirname(__FILE__));
        $baseDir = dirname($vendorDir);
        spl_autoload_register(function ($className) use($baseDir) {
            if (file_exists($file = $baseDir . '/database/seeds/' . $className . '.php')) {
                include($file);
                return true;
            }
        });

        $this->call([
            ModulesTableSeeder::class,
            PrivilegesTableSeeder::class,
            SettingsTableSeeder::class,
        ]);
    }
53738
public function run()
    {
        $this->loader->register();
        $result   = true;
        $classMap = array_slice($this->classMap, 0);

        // Now try to autoload all classes.
        while ($classMap) {
            $file  = reset($classMap);
            $class = key($classMap);
            try {
                $result = $this->tryLoadClass($class, $file) && $result;
            } catch (ParentClassNotFoundException $exception) {
                $this->handleParentClassNotFound($exception, $classMap);

                continue;
            }

            unset($classMap[$class]);
            $this->logger->info(
                'Loaded {class}.',
                array('class' => $class, 'file' => $file)
            );
        }

        $this->loader->unregister();

        return $result;
    }
1296915
public function run()
    {

        // Check if we have the schedules, else,
        // insert them
        foreach ($this->schedule as $job) {

            if (! DB::table('schedules')->where('command', $job['command'])->first())
                DB::table('schedules')->insert($job);
        }
    }
649417
public function run()
    {
        Model::unguard();

        $this->call(RolesTableSeeder::class);
        $this->call(UserTableSeeder::class);

        Model::reguard();
    }