cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco and Quartz using Jdbcjobstore

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
i have this Environment:

- ALFRESCO: Community Current version 3.2.0 (r2 2440) schema 3300
- OS: Windows xp 32 bit , RAM 2,5G , Intel Core Duo 2,1 GHz
- AS: Tomcat 6.0.18
- JAVA: Jdk 6.0_11. Heap 986,125MB
- DB :Mysql 5.1.35 Community

I try to use Quartz with Jdbcjobstore, this is my quartz.properties:

#============================================================================
# Configure Main Scheduler Properties 
#============================================================================

org.quartz.scheduler.instanceName = TestScheduler
org.quartz.scheduler.instanceId = AUTO

#============================================================================
# Configure ThreadPool 
#============================================================================

org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 10
org.quartz.threadPool.threadPriority = 3

#============================================================================
# Configure JobStore 
#============================================================================

org.quartz.jobStore.misfireThreshold = 60000

#org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
#org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
#org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.dataSource = myDS
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.jobStore.isClustered = true

#============================================================================
# Configure Datasources 
#============================================================================

#org.quartz.dataSource.myDS.jndiURL = java:comp/env/jdbc/QuartzLocalDS
#org.quartz.dataSource.NAME.jndiAlwaysLookup = DB_JNDI_ALWAYS_LOOKUP
#org.quartz.dataSource.NAME.java.naming.factory.initial = JNDI_CTXT_FACTORY
#org.quartz.dataSource.NAME.java.naming.provider.url = JNDI_PROVIDER_URL
#org.quartz.dataSource.NAME.java.naming.security.principal = JNDI_PRINCIPAL
#org.quartz.dataSource.NAME.java.naming.security.credentials = JNDI_CREDENTIALS

#org.quartz.dataSource.myDS.driver = oracle.jdbc.driver.OracleDriver
#org.quartz.dataSource.myDS.URL = jdbc:oracle:thin:@10.10.22.151:1521:quartz
#org.quartz.dataSource.myDS.user = quartz16
#org.quartz.dataSource.myDS.password = quartz16
#org.quartz.dataSource.myDS.maxConnections = 5

org.quartz.dataSource.myDS.driver = org.gjt.mm.mysql.Driver
org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost/alfresco
org.quartz.dataSource.myDS.user = alfresco
org.quartz.dataSource.myDS.password = alfresco
org.quartz.dataSource.myDS.maxConnections = 5

#============================================================================
# Configure Plugins
#============================================================================

org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin

org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
# init plugin will load jobs.xml as a classpath resource i.e. /jobs.xml if not found on file system
org.quartz.plugin.jobInitializer.fileNames=jobs.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = false
org.quartz.plugin.jobInitializer.failOnFileNotFound = false


But i have this error:

15:09:26,343 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ftsIndexerTrigger' defined in class path resource [alfresco/scheduled-jobs-context.xml]: Invocation of init method failed; nested exception is org.quartz.JobPersistenceException: Couldn't store job: Unable to serialize JobDataMap for insertion into database because the value of property 'bean' is not serializable: org.springframework.beans.factory.support.DefaultListableBeanFactory [See nested exception: java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'bean' is not serializable: org.springframework.beans.factory.support.DefaultListableBeanFactory]
Caused by: org.quartz.JobPersistenceException: Couldn't store job: Unable to serialize JobDataMap for insertion into database because the value of property 'bean' is not serializable: org.springframework.beans.factory.support.DefaultListableBeanFactory [See nested exception: java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'bean' is not serializable: org.springframework.beans.factory.support.DefaultListableBeanFactory]
   at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1041)
   at org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:983)
   at org.quartz.impl.jdbcjobstore.JobStoreSupport$39.execute(JobStoreSupport.java:3590)
   at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3662)
   at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
   at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3586)
   at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:971)
   at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:703)
   at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:255)
   at org.alfresco.util.AbstractTriggerBean.afterPropertiesSet(AbstractTriggerBean.java:118)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'bean' is not serializable: org.springframework.beans.factory.support.DefaultListableBeanFactory
   at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3354)
   at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.insertJobDetail(StdJDBCDelegate.java:515)
   at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1038)
   … 46 more


The error is due to something is not serializable.
How can i do it ( quartz on DB)?

Regards
4 REPLIES 4

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
i have the same problem on a different stack but with the same version of Alfresco.

fracat71
Champ on-the-rise
Champ on-the-rise
Hi all,
nobody can help me?

tfrith
Champ on-the-rise
Champ on-the-rise
Can you show us your scheduled-jobs-context.xml file?

The ftsIndexerTrigger bean in particular.

fracat71
Champ on-the-rise
Champ on-the-rise
Hi,
this is the default scheduled-jobs-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <bean id="resourceFinder" class="org.alfresco.util.ResourceFinder"/>
   
    <bean id="schedulerResources" factory-bean="resourceFinder" factory-method="getResources">
        <constructor-arg>
            <list>
                <value>classpath:alfresco/domain/quartz.properties</value>
                <value>classpath*:alfresco/enterprise/*-quartz.properties</value>
                <value>classpath*:alfresco/extension/*-quartz.properties</value>
            </list>
        </constructor-arg>
    </bean>
   
    <bean id="schedulerProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="locations">
            <ref bean="schedulerResources" />
        </property>
    </bean>
   
    <!– Task scheduler –>
    <!– Triggers should not appear here - the scheduler should be injected into the trigger definition –>
    <!– This bean should not need to apear else where in extension configuration –>
    <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
        <property name="waitForJobsToCompleteOnShutdown">
            <value>true</value>
        </property>
        <property name="schedulerFactoryClass">
            <value>org.alfresco.repo.scheduler.AlfrescoSchedulerFactory</value>
        </property>
        <property name="quartzProperties">
            <ref bean="schedulerProperties" />
        </property>
        <property name="schedulerName">
            <value>DefaultScheduler</value>
        </property>
        <!– Do not auto start the scheduler - this is done at the end of the bootstrap process –>
        <property name="autoStartup">
            <value>false</value>
        </property>
    </bean>

    <!–                 –>
    <!– Scheduled tasks –>
    <!–                 –>

    <bean id="ftsIndexerTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="ftsIndexerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.search.impl.lucene.fts.FTSIndexerJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="bean">
                            <ref bean="LuceneFullTextSearchIndexer" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="startDelayMinutes">
            <value>1</value>
        </property>
        <property name="repeatIntervalMinutes">
            <value>1</value>
        </property>
    </bean>

    <!– This has now been moved into the bootstrap process and is not required here –>
    <!–
    <bean id="indexRecoveryTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="indexRecoveryComponent">
                            <ref bean="indexRecoveryComponent" />
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="startDelayMinutes">
            <value>1</value>
        </property>
        <property name="repeatCount">
            <value>0</value>
        </property>
    </bean>
    –>
   
    <bean id="tempFileCleanerTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="tempFileCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.util.TempFileProvider$TempFileCleanerJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                        <entry key="protectHours">
                            <value>1</value>
                        </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <!– start after half an hour and repeat hourly –>
        <property name="startDelayMinutes">
            <value>30</value>
        </property>
        <property name="repeatIntervalMinutes">
            <value>60</value>
        </property>
    </bean>

<!–
    <bean id="fileContentStoreCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
            <value>org.alfresco.repo.content.cleanup.ContentStoreCleanupJob</value>
        </property>
        <property name="jobDataAsMap">
            <map>
                <entry key="contentStoreCleaner">
                    <ref bean="contentStoreCleaner" />
                </entry>
            </map>
        </property>
    </bean>
    <bean id="contentStoreCleanerTrigger" class="org.alfresco.util.CronTriggerBean">
        <property name="jobDetail">
            <ref bean="fileContentStoreCleanerJobDetail" />
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="cronExpression">
            <value>0 0 4 * * ?</value>
        </property>
    </bean>
–>

    <bean id="nodeServiceCleanupJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
            <value>org.alfresco.repo.node.cleanup.NodeCleanupJob</value>
        </property>
        <property name="jobDataAsMap">
            <map>
                <entry key="nodeCleanupWorker">
                    <ref bean="nodeCleanupRegistry" />
                </entry>
            </map>
        </property>
    </bean>
    <bean id="nodeServiceCleanupTrigger" class="org.alfresco.util.CronTriggerBean">
        <property name="jobDetail">
            <ref bean="nodeServiceCleanupJobDetail" />
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="cronExpression">
            <value>0 0 21 * * ?</value>
        </property>
    </bean>

    <bean id="indexBackupJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
            <value>org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory$LuceneIndexBackupJob</value>
        </property>
        <property name="jobDataAsMap">
            <map>
                <entry key="luceneIndexBackupComponent">
                    <ref bean="luceneIndexBackupComponent" />
                </entry>
            </map>
        </property>
    </bean>
    <bean id="indexBackupTrigger" class="org.alfresco.util.CronTriggerBean">
        <property name="jobDetail">
            <ref bean="indexBackupJobDetail" />
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <!– trigger at 3am each day –>
        <property name="cronExpression">
            <value>0 0 3 * * ?</value>
        </property>
    </bean>

    <!– enable DEBUG for 'org.alfresco.repo.cache.EhCacheTracerJob' and enable scheduler property to activate –>
    <bean id="ehCacheTracerJob" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="ehCacheTracerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.cache.EhCacheTracerJob</value>
                </property>
            </bean>
        </property>
        <!– enable this to activate bean
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        –>
        <!– start after an hour and repeat hourly –>
        <property name="startDelayMinutes">
            <value>60</value>
        </property>
        <property name="repeatIntervalMinutes">
            <value>60</value>
        </property>
    </bean>
   
    <bean id="avmOrphanReaperJob" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="avmOrphanReaperJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.avm.OrphanReaperJob</value>
                </property>
              <property name="jobDataAsMap">
                  <map>
                      <entry key="orphanReaper">
                          <ref bean="orphanReaper"/>
                      </entry>
                  </map>
              </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory"/>
        </property>
        <property name="startDelayMinutes">
            <value>1</value>
        </property>
        <property name="repeatIntervalMinutes">
            <value>1</value>
        </property>
    </bean>

    <!– Job to scan for expired content in website staging areas –>
    <bean id="avmExpiredContentTrigger" class="org.alfresco.util.CronTriggerBean">
        <property name="jobDetail">
            <bean id="avmExpiredContentJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.avm.AVMExpiredContentJob</value>
                </property>
                <property name="jobDataAsMap">
                    <map>
                       <entry key="expiredContentProcessor">
                           <ref bean="avmExpiredContentProcessor" />
                       </entry>
                    </map>
                </property>
            </bean>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <!– trigger at 3:30am each day –>
        <property name="cronExpression">
            <value>0 30 3 * * ?</value>
        </property>
    </bean>
       
    <!– enable scheduler property to activate –>
    <bean id="userUsageCollapseJob" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="userUsageTrackingJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.usage.UserUsageCollapseJob</value>
                </property>
               <property name="jobDataAsMap">
                  <map>
                        <entry key="userUsageTrackingComponent">
                          <ref bean="userUsageTrackingComponent" />
                      </entry>
                 </map>
              </property>
           </bean>
        </property>
       
        <!– enable this to activate bean –>
       
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
            
        <!– start after 5 minutes and repeat every 5 minutes –>
        <property name="startDelayMinutes">
            <value>5</value>
        </property>
        <property name="repeatIntervalMinutes">
            <value>5</value>
        </property>
         
    </bean>
   
    <!– There is a job available to purge old deploymentattempt nodes  –>
    <!– from the repository. The maximum age of the node can be configured. –>
    <!– See the wiki (http://wiki.alfresco.com/wikiDeployment) for details –>
    <!– and the deployment-attempt-cleaner-context.xml.sample file. –>
   

    <!– Activities Feed Cleaner –>
   
    <bean id="feedCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
            <value>org.alfresco.repo.activities.feed.cleanup.FeedCleanupJob</value>
        </property>
        <property name="jobDataAsMap">
            <map>
                <entry key="feedCleaner">
                    <ref bean="feedCleaner" />
                </entry>
            </map>
        </property>
    </bean>
    <bean id="feedCleanerTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <ref bean="feedCleanerJobDetail" />
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="startDelayMinutes">
            <value>5</value>
        </property>
        <property name="repeatIntervalMinutes">
            <value>10</value>
        </property>
    </bean>
   
    <bean id="feedGeneratorJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
            <value>org.alfresco.repo.activities.feed.FeedGeneratorJob</value>
        </property>
        <property name="jobDataAsMap">
            <map>
                <entry key="feedGenerator">
                    <ref bean="feedGenerator" />
                </entry>
            </map>
        </property>
    </bean>
   
    <bean id="feedGeneratorTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <ref bean="feedGeneratorJobDetail" />
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="startDelayMinutes">
            <value>0</value>
        </property>
        <property name="repeatInterval">
            <value>30000</value> <!– 30000 msecs = 30 seconds –>
        </property>
    </bean>
   
    <!– Activities Post Lookup (for secondary lookup) –>
   
    <bean id="postLookupJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
            <value>org.alfresco.repo.activities.post.lookup.PostLookupJob</value>
        </property>
        <property name="jobDataAsMap">
            <map>
                <entry key="postLookup">
                    <ref bean="postLookup" />
                </entry>
            </map>
        </property>
    </bean>
    <bean id="postLookupTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <ref bean="postLookupJobDetail" />
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="startDelayMinutes">
            <value>1</value>
        </property>
        <property name="repeatInterval">
            <value>15000</value> <!– 15000 msecs = 15 seconds –>
        </property>
    </bean>
   
    <!– Activities Post Cleaner –>
   
    <bean id="postCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <property name="jobClass">
            <value>org.alfresco.repo.activities.post.cleanup.PostCleanupJob</value>
        </property>
        <property name="jobDataAsMap">
            <map>
                <entry key="postCleaner">
                    <ref bean="postCleaner" />
                </entry>
            </map>
        </property>
    </bean>
    <bean id="postCleanerTrigger" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <ref bean="postCleanerJobDetail" />
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
        <property name="startDelayMinutes">
            <value>10</value>
        </property>
        <property name="repeatIntervalMinutes">
            <value>10</value>
        </property>
    </bean>
  
    <!– enable scheduler property to activate –>
    <bean id="versionStoreMigrationCleanupJob" class="org.alfresco.util.TriggerBean">
        <property name="jobDetail">
            <bean id="versionStoreMigrationCleanupDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
                <property name="jobClass">
                    <value>org.alfresco.repo.version.MigrationCleanupJob</value>
                </property>
               <property name="jobDataAsMap">
                   <map>
                        <entry key="versionMigrator">
                            <ref bean="versionMigrator" />
                        </entry>
                        <entry key="tenantAdminService">
                            <ref bean="tenantAdminService" />
                        </entry>
                   </map>
               </property>
            </bean>
        </property>
       
        <!– enable this to activate bean –>
       
        <property name="scheduler">
            <ref bean="schedulerFactory" />
        </property>
               
        <!– start after bootstrap (1 minute) and run once –>
        <property name="startDelayMinutes">
            <value>1</value>
        </property>
        <property name="repeatCount">
            <value>0</value>
        </property>
         
    </bean>
</beans>

I tested with using my scheduled-action-services-context.xml and also without using scheduled-action-services-context.xml


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   
    <!–
    Define the model factory used to generate object models suitable for use with freemarker templates.
    –>
    <bean id="templateActionModelFactory" class="org.alfresco.repo.action.scheduled.FreeMarkerWithLuceneExtensionsModelFactory">
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
    </bean>
   
    <!–
    An example action template that defines an action to add the generalclassifiable aspect to all nodes that do not have
    and add a category defined by path.   
    –>
    <bean id="addAmministratiAction" class="org.alfresco.repo.action.scheduled.SimpleTemplateActionDefinition">
        <property name="actionName">
            <value>AmministratiActionExecuter</value>
        </property>
        <property name="parameterTemplates">
            <map>
                <entry>
                    <key>
                        <value>QUERY</value>
                    </key>
                    <value>PROVA</value>
                </entry>        
            </map>
        </property>
        <property name="templateActionModelFactory">
            <ref bean="templateActionModelFactory"/>
        </property>
        <property name="dictionaryService">
            <ref bean="DictionaryService"/>
        </property>
        <property name="actionService">
            <ref bean="ActionService"/>
        </property>
        <property name="templateService">
            <ref bean="TemplateService"/>
        </property>
    </bean>
   

    <bean id="addClassifiableAspectEveryTenMinutes" class="org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinition">
        <property name="transactionMode">
            <value>UNTIL_FIRST_FAILURE</value>
        </property>
        <property name="compensatingActionMode">
            <value>IGNORE</value>
        </property>
        <property name="searchService">
            <ref bean="SearchService"/>
        </property>
        <property name="templateService">
            <ref bean="TemplateService"/>
        </property>
        <property name="queryLanguage">
            <value>lucene</value>
        </property>
        <property name="stores">
            <list>
                <value>workspace://SpacesStore</value>
            </list>
        </property>
        <!– Find all nodes that do not have the aspect –>
      <property name="queryTemplate">
            <value>PATH:"/app:company_home"</value>
      </property>
        <property name="cronExpression">
            <value>0 0/1 * * * ?</value>
        </property>
        <property name="jobName">
            <value>jobA</value>
        </property>
        <property name="jobGroup">
            <value>jobGroup</value>
        </property>
        <property name="triggerName">
            <value>triggerA</value>
        </property>
        <property name="triggerGroup">
            <value>triggerGroup</value>
        </property>
        <property name="scheduler">
            <ref bean="schedulerFactory"/>
        </property>
        <property name="actionService">
            <ref bean="ActionService"/>
        </property>
        <property name="templateActionModelFactory">
            <ref bean="templateActionModelFactory"/>
        </property>
        <property name="templateActionDefinition">
            <ref bean="addAmministratiAction"/>
        </property>
        <property name="transactionService">
            <ref bean="TransactionService"/>
        </property>
        <property name="runAsUser">
            <value>System</value>
        </property>
    </bean>
   

   
</beans>

Regards.