Index: cronjobs/ldapusermanage.php
===================================================================
--- cronjobs/ldapusermanage.php	(revision 18616)
+++ cronjobs/ldapusermanage.php	(working copy)
@@ -38,7 +38,6 @@
 include_once( 'kernel/classes/datatypes/ezuser/ezusersetting.php' );
 include_once( 'kernel/classes/ezcontentobject.php' );
 
-eZModule::setGlobalPathList( array( "kernel" ) );
 if ( !$isQuiet )
     $cli->output( "Checking LDAP users ..."  );
 
Index: cronjobs/linkcheck.php
===================================================================
--- cronjobs/linkcheck.php	(revision 18616)
+++ cronjobs/linkcheck.php	(working copy)
@@ -37,7 +37,6 @@
 
 ini_set( 'user_agent', 'eZ publish Link Validator' );
 
-eZModule::setGlobalPathList( array( "kernel" ) );
 if ( !$isQuiet )
     $cli->output( "Checking link ..." );
 
Index: cronjobs/updateviewcount.php
===================================================================
--- cronjobs/updateviewcount.php	(revision 18616)
+++ cronjobs/updateviewcount.php	(working copy)
@@ -39,7 +39,6 @@
 include_once( 'lib/ezlocale/classes/ezdatetime.php' );
 
 set_time_limit( 0 );
-eZModule::setGlobalPathList( array( "kernel" ) );
 
 if ( !$isQuiet )
     $cli->output( "Update content view count..."  );
Index: cronjobs/workflow.php
===================================================================
--- cronjobs/workflow.php	(revision 18616)
+++ cronjobs/workflow.php	(working copy)
@@ -53,7 +53,7 @@
 $workflowProcessList = eZWorkflowProcess::fetchForStatus( EZ_WORKFLOW_STATUS_DEFERRED_TO_CRON );
 //var_dump( $workflowProcessList  );
 //$user =& eZUser::instance( 14 );
-eZModule::setGlobalPathList( array( "kernel" ) );
+
 if ( !$isQuiet )
     $cli->output( "Checking for workflow processes"  );
 $removedProcessCount = 0;
Index: doc/changelogs/3.10/unstable/CHANGELOG-3.9.0-to-3.10.0alpha1
===================================================================
--- doc/changelogs/3.10/unstable/CHANGELOG-3.9.0-to-3.10.0alpha1	(revision 18616)
+++ doc/changelogs/3.10/unstable/CHANGELOG-3.9.0-to-3.10.0alpha1	(working copy)
@@ -241,3 +241,4 @@
 - Fixed bug #10591: Fatal error on editing objects.
   (Merged from stable/3.9 (3.9.2) rev. 18612)
 - Fixed bug #10377: Inconsistent attribute data
+- Fixed bug #10255: Module global path list not correctly initialized in workflow cronjob
Index: index.php
===================================================================
--- index.php	(revision 18616)
+++ index.php	(working copy)
@@ -509,41 +509,7 @@
 
 // Initialize module loading
 include_once( "lib/ezutils/classes/ezmodule.php" );
-
-$moduleINI =& eZINI::instance( 'module.ini' );
-$globalModuleRepositories = $moduleINI->variable( 'ModuleSettings', 'ModuleRepositories' );
-$extensionRepositories = $moduleINI->variable( 'ModuleSettings', 'ExtensionRepositories' );
-$extensionDirectory = eZExtension::baseDirectory();
-$activeExtensions = eZExtension::activeExtensions();
-$globalExtensionRepositories = array();
-foreach ( $extensionRepositories as $extensionRepository )
-{
-    $extPath = $extensionDirectory . '/' . $extensionRepository;
-    $modulePath = $extPath . '/modules';
-    if ( file_exists( $modulePath ) )
-    {
-        $globalExtensionRepositories[] = $modulePath;
-    }
-    else if ( !file_exists( $extPath ) )
-    {
-        eZDebug::writeWarning( "Extension '$extensionRepository' was reported to have modules but the extension itself does not exist.\n" .
-                               "Check the setting ModuleSettings/ExtensionRepositories in module.ini for your extensions.\n" .
-                               "You should probably remove this extension from the list." );
-    }
-    else if ( !in_array( $extensionRepository, $activeExtensions ) )
-    {
-        eZDebug::writeWarning( "Extension '$extensionRepository' was reported to have modules but has not yet been activated.\n" .
-                               "Check the setting ModuleSettings/ExtensionRepositories in module.ini for your extensions\n" .
-                               "or make sure it is activated in the setting ExtensionSettings/ActiveExtensions in site.ini." );
-    }
-    else
-    {
-        eZDebug::writeWarning( "Extension '$extensionRepository' does not have the subdirectory 'modules' allthough it reported it had modules.\n" .
-                               "Looked for directory '" . $modulePath . "'\n" .
-                               "Check the setting ModuleSettings/ExtensionRepositories in module.ini for your extension." );
-    }
-}
-$moduleRepositories = array_merge( $moduleRepositories, $globalModuleRepositories, $globalExtensionRepositories );
+$moduleRepositories = eZModule::activeModuleRepositories();
 eZModule::setGlobalPathList( $moduleRepositories );
 
 include_once( 'kernel/classes/eznavigationpart.php' );
Index: kernel/classes/ezscript.php
===================================================================
--- kernel/classes/ezscript.php	(revision 18616)
+++ kernel/classes/ezscript.php	(working copy)
@@ -315,27 +315,8 @@
         // Initialize module handling
         if ( $this->UseModules )
         {
-            $moduleRepositories = array();
-            $moduleINI =& eZINI::instance( 'module.ini' );
-            $globalModuleRepositories = $moduleINI->variable( 'ModuleSettings', 'ModuleRepositories' );
-            $extensionRepositories = $moduleINI->variable( 'ModuleSettings', 'ExtensionRepositories' );
-
-            if ( $this->UseExtensions )
-                $extensionDirectory = eZExtension::baseDirectory();
-            else
-                $extensionDirectory = array();
-
-            $globalExtensionRepositories = array();
-            foreach ( $extensionRepositories as $extensionRepository )
-            {
-                $modulePath = $extensionDirectory . '/' . $extensionRepository . '/modules';
-                if ( file_exists( $modulePath ) )
-                {
-                    $globalExtensionRepositories[] = $modulePath;
-                }
-            }
-            $moduleRepositories = array_merge( $moduleRepositories, $globalModuleRepositories, $globalExtensionRepositories );
             include_once( 'lib/ezutils/classes/ezmodule.php' );
+            $moduleRepositories = eZModule::activeModuleRepositories( $this->UseExtensions );
             eZModule::setGlobalPathList( $moduleRepositories );
         }
         $this->IsInitialized = true;
Index: lib/ezutils/classes/ezmodule.php
===================================================================
--- lib/ezutils/classes/ezmodule.php	(revision 18616)
+++ lib/ezutils/classes/ezmodule.php	(working copy)
@@ -1260,6 +1260,58 @@
 
     /*!
      \static
+     \return a path list of currently active modules
+    */
+    function activeModuleRepositories( $useExtensions = true )
+    {
+        include_once( 'lib/ezutils/classes/ezini.php' );
+        include_once( 'lib/ezutils/classes/ezextension.php );
+        $moduleINI =& eZINI::instance( 'module.ini' );
+        $moduleRepositories = $moduleINI->variable( 'ModuleSettings', 'ModuleRepositories' );
+
+        if ( $useExtensions )
+        {
+            $extensionRepositories = $moduleINI->variable( 'ModuleSettings', 'ExtensionRepositories' );
+            $extensionDirectory = eZExtension::baseDirectory();
+            $activeExtensions = eZExtension::activeExtensions();
+            $globalExtensionRepositories = array();
+
+            foreach ( $extensionRepositories as $extensionRepository )
+            {
+                $extPath = $extensionDirectory . '/' . $extensionRepository;
+                $modulePath = $extPath . '/modules';
+                if ( file_exists( $modulePath ) )
+                {
+                    $globalExtensionRepositories[] = $modulePath;
+                }
+                else if ( !file_exists( $extPath ) )
+                {
+                    eZDebug::writeWarning( "Extension '$extensionRepository' was reported to have modules but the extension itself does not exist.\n" .
+                                           "Check the setting ModuleSettings/ExtensionRepositories in module.ini for your extensions.\n" .
+                                           "You should probably remove this extension from the list." );
+                }
+                else if ( !in_array( $extensionRepository, $activeExtensions ) )
+                {
+                    eZDebug::writeWarning( "Extension '$extensionRepository' was reported to have modules but has not yet been activated.\n" .
+                                           "Check the setting ModuleSettings/ExtensionRepositories in module.ini for your extensions\n" .
+                                           "or make sure it is activated in the setting ExtensionSettings/ActiveExtensions in site.ini." );
+                }
+                else
+                {
+                    eZDebug::writeWarning( "Extension '$extensionRepository' does not have the subdirectory 'modules' allthough it reported it had modules.\n" .
+                                           "Looked for directory '" . $modulePath . "'\n" .
+                                           "Check the setting ModuleSettings/ExtensionRepositories in module.ini for your extension." );
+                }
+            }
+
+            $moduleRepositories = array_merge( $moduleRepositories, $globalExtensionRepositories );
+        }
+
+        return $moduleRepositories;
+    }
+
+    /*!
+     \static
      Sets the global path list which is used for finding modules.
      \param $pathList Is either an array with path strings or a single path string
      \sa addGlobalPathList
