This commit is contained in:
Marco Antonio Nina Mena
2018-03-15 16:35:53 -04:00
committed by Paula Quispe
parent c480a8b65e
commit 937e40d6d1
13 changed files with 155 additions and 38 deletions

View File

@@ -439,8 +439,16 @@ function executePlugins()
// -> Execute functions
if (!empty($cronFiles)) {
setExecutionMessage('Executing registered cron files for Workspace: ' . SYS_SYS);
/**
* @var \ProcessMaker\Plugins\Interfaces\CronFile $cronFile
*/
foreach($cronFiles as $cronFile) {
executeCustomCronFunction(PATH_PLUGINS . $cronFile->namespace . PATH_SEP . 'bin' . PATH_SEP . $cronFile->cronFile . '.php', $cronFile->cronFile);
$path = PATH_PLUGINS . $cronFile->getNamespace() . PATH_SEP . 'bin' . PATH_SEP . $cronFile->getCronFile() . '.php';
if (file_exists($path)) {
executeCustomCronFunction($path, $cronFile->getCronFile());
} else {
setExecutionMessage('File ' . $cronFile->getCronFile() . '.php ' . 'does not exist.');
}
}
}