<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic mise en place d'un cron sous sdk 3 in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/mise-en-place-d-un-cron-sous-sdk-3/m-p/75625#M49772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour à tous,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Voila je souhaite exécuter un script chaque soir sur mes nœuds user Alfresco.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;je sais que je dois faire un cron , mais je ne comprend pas à quoi correspond chaque balise du fichier XML.&lt;/P&gt;&lt;P&gt;De plus je suis sur une achi maven sdk 3 et je ne sais pas ou placer mon script pour qu'il soit déployée au chemin voulu&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;voila un bout code que j'ai fait mais il ne fonctionne pas (je sais que value est configuré pour 10 minute) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P dir="ltr"&gt;&amp;lt;bean id="runScriptResetPassword" class="org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinition"&amp;gt;&lt;BR /&gt; &amp;lt;property name="transactionMode"&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;UNTIL_FIRST_FAILURE&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="compensatingActionMode"&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;IGNORE&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="searchService"&amp;gt;&lt;BR /&gt; &amp;lt;ref bean="SearchService"/&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="templateService"&amp;gt;&lt;BR /&gt; &amp;lt;ref bean="TemplateService"/&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="queryLanguage"&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;lucene&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="cronExpression"&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;0 0/10 * * * ?&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="jobName"&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;resetOldPassword&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="triggerName"&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;SendMailEveryTenMinutesScheduleTrigger&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name='triggerGroup'&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;triggerGroup&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="scheduler"&amp;gt;&lt;BR /&gt; &amp;lt;ref bean="schedulerFactory"/&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="actionService"&amp;gt;&lt;BR /&gt; &amp;lt;ref bean="ActionService"/&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="templateActionModelFactory"&amp;gt;&lt;BR /&gt; &amp;lt;ref bean="templateActionModelFactory"/&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="templateActionDefinition"&amp;gt;&lt;BR /&gt; &amp;lt;ref bean="runScriptResetPassword"/&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="transactionService"&amp;gt;&lt;BR /&gt; &amp;lt;ref bean="TransactionService"/&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="runAsUser"&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;System&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;property name="parameterTemplates"&amp;gt;&lt;BR /&gt; &amp;lt;map&amp;gt;&lt;BR /&gt; &amp;lt;entry&amp;gt;&lt;BR /&gt; &amp;lt;key&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;script-ref&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/key&amp;gt;&lt;BR /&gt; &amp;lt;value&amp;gt;\$\{selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/app:company_home/app:dictionary/app:scripts/cm:resetPassword.js"' )\}&amp;lt;/value&amp;gt;&lt;BR /&gt; &amp;lt;/entry&amp;gt;&lt;BR /&gt; &amp;lt;/map&amp;gt;&lt;BR /&gt; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;lt;/bean&amp;gt;&lt;BR /&gt;&amp;lt;/beans&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jun 2017 08:12:32 GMT</pubDate>
    <dc:creator>mpavot</dc:creator>
    <dc:date>2017-06-16T08:12:32Z</dc:date>
    <item>
      <title>mise en place d'un cron sous sdk 3</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mise-en-place-d-un-cron-sous-sdk-3/m-p/75625#M49772</link>
      <description>Bonjour à tous,Voila je souhaite exécuter un script chaque soir sur mes nœuds user Alfresco.je sais que je dois faire un cron , mais je ne comprend pas à quoi correspond chaque balise du fichier XML.De plus je suis sur une achi maven sdk 3 et je ne sais pas ou placer mon script pour qu'il soit déplo</description>
      <pubDate>Fri, 16 Jun 2017 08:12:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mise-en-place-d-un-cron-sous-sdk-3/m-p/75625#M49772</guid>
      <dc:creator>mpavot</dc:creator>
      <dc:date>2017-06-16T08:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: mise en place d'un cron sous sdk 3</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mise-en-place-d-un-cron-sous-sdk-3/m-p/75626#M49773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bonjour,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A la lecture de votre post j'en déduis que vous suivez cette page :&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/docs/DOC-4938"&gt;Scheduled Actions&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;L'extrait XML que vous avez fournit correspond à la définition d'un bean spring se basant sur la classe&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #f6f6f6;"&gt;CronScheduledQueryBasedTemplateActionDefinition&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Votre script resetPassword.js doit se trouver dans le dictionnaire de donnée au vue de la configuration du bean :&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #f6f6f6; color: #000000;"&gt;&amp;lt;value&amp;gt;\$\{selectSingleNode('workspace://SpacesStore', 'lucene', 'PATH:"/app:company_home/app:dictionary/app:scripts/cm:resetPassword.js"' )\}&amp;lt;/value&amp;gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Il n'est donc pas nécessaire de le mettre dans votre projet maven.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Si vous êtes plus à l'aise avec Java vous pouvez également définir des jobs via ce langage :&amp;nbsp;&lt;A class="link-titled" href="http://docs.alfresco.com/5.2/references/dev-extension-points-scheduled-jobs.html" title="http://docs.alfresco.com/5.2/references/dev-extension-points-scheduled-jobs.html" rel="nofollow noopener noreferrer"&gt;Scheduled Jobs | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Y.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 08:25:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mise-en-place-d-un-cron-sous-sdk-3/m-p/75626#M49773</guid>
      <dc:creator>ycoulon</dc:creator>
      <dc:date>2017-06-16T08:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: mise en place d'un cron sous sdk 3</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/mise-en-place-d-un-cron-sous-sdk-3/m-p/75627#M49774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Merci Yann de ta réponse&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;j'ai un peu avancé et commence a bien comprendre le système de cron dans Alfresco.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;je pense avoir bien set mon cron mais j'ai une erreur :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;nbsp;2017-06-16 11:00:20,559 ERROR [quartz.core.JobRunShell] [DefaultScheduler_Worker-2] Job jobGroup_ver.jobA threw an unhandled Exception:&lt;BR /&gt; java.lang.ClassCastException: org.alfresco.repo.action.scheduled.SimpleTemplateActionDefinition cannot be cast to org.alfresco.repo.action.executer.ActionExecuter&lt;BR /&gt; at org.alfresco.repo.action.scheduled.SimpleTemplateActionDefinition.getAction(SimpleTemplateActionDefinition.java:178)&lt;BR /&gt; at org.alfresco.repo.action.scheduled.CronScheduledQueryBasedTemplateActionDefinition.getAction(CronScheduledQueryBasedTemplateActionDefinition.java:282)&lt;BR /&gt; at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition$1$1.execute(AbstractScheduledAction.java:477)&lt;BR /&gt; at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)&lt;BR /&gt; at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:333)&lt;BR /&gt; at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition$1.runTransactionalActions(AbstractScheduledAction.java:465)&lt;BR /&gt; at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition$1.doWork(AbstractScheduledAction.java:417)&lt;BR /&gt; at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)&lt;BR /&gt; at org.alfresco.repo.action.scheduled.AbstractScheduledAction$JobDefinition.execute(AbstractScheduledAction.java:399)&lt;BR /&gt; at org.quartz.core.JobRunShell.run(JobRunShell.java:216)&lt;BR /&gt; at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;Merci encore !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 09:12:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/mise-en-place-d-un-cron-sous-sdk-3/m-p/75627#M49774</guid>
      <dc:creator>mpavot</dc:creator>
      <dc:date>2017-06-16T09:12:49Z</dc:date>
    </item>
  </channel>
</rss>

