<?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 Re: Run js script with cron from scheduled-jobs-context.xml in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291031#M244161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the problem is resolved. I used the Script Action Example at the end of this page &lt;/SPAN&gt;&lt;A href="https://wiki.alfresco.com/wiki/Scheduled_Actions" rel="nofollow noopener noreferrer"&gt;https://wiki.alfresco.com/wiki/Scheduled_Actions&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;and just changed the place and the name of the script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2014 13:09:10 GMT</pubDate>
    <dc:creator>svetlingulev</dc:creator>
    <dc:date>2014-08-04T13:09:10Z</dc:date>
    <item>
      <title>Run js script with cron from scheduled-jobs-context.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291027#M244157</link>
      <description>hi,i have a .js script that a want to run every 1 hour.I am following this tutorial http://aboutalfresco.blogspot.com/2010/01/scheduled-actions-in-alfresco.htmlI've read about Scheduled Actions and i have some questions:1. The file scheduled-jobs-context.xml must be put in tomcat/shared/alfresco/cla</description>
      <pubDate>Fri, 01 Aug 2014 16:13:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291027#M244157</guid>
      <dc:creator>svetlingulev</dc:creator>
      <dc:date>2014-08-01T16:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Run js script with cron from scheduled-jobs-context.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291028#M244158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check out the file - &amp;lt;strong&amp;gt;"scheduled-action-services-context.xml.sample"&amp;lt;/strong&amp;gt; under &amp;lt;strong&amp;gt;tomcat\shared\classes\alfresco\extension&amp;lt;/strong&amp;gt;. Rename it to scheduled-action-services-context.xml and check out for various sample jobs in it. After adding/modifying you bean definition restart the server to make the changes reflect.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 17:33:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291028#M244158</guid>
      <dc:creator>sujaypillai</dc:creator>
      <dc:date>2014-08-01T17:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Run js script with cron from scheduled-jobs-context.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291029#M244159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1. Yes ,scheduled-jobs-context.xml must be put in tomcat/shared/alfresco/classes/extension folder.it will trigger the quartz job you configured in CronScheduledQueryBasedTemplateActionDefinition class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.If the scrip you want to run located in &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt; Company Home &amp;gt; Data Dictionary &amp;gt; Web Scripts &amp;gt; org &amp;gt; alfresco &amp;gt; test &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; you should write it like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;!–note that after alfresco 4.0,&amp;nbsp; freemarker&amp;nbsp; entries must be escaped–&amp;gt;&lt;BR /&gt;&amp;lt;value&amp;gt;\$\{selectSingleNode('workspace://SpacesStore', 'lucene','PATH:"/app:company_home/app:dictionary/cm:webscripts/cm:org/cm:alfresco/cm:test/cm:hello.get.js"')\}&amp;lt;/value&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way why not put your js into &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;nbsp; Company Home &amp;gt; Data Dictionary &amp;gt; scripts&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 17:25:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291029#M244159</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-08-02T17:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Run js script with cron from scheduled-jobs-context.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291030#M244160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;kaynezhang, thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i have put my js file in Company Home &amp;gt; Data Dictionary &amp;gt; scripts&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but an error is rised&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;and here is my javacript code in file createsite.js&lt;BR /&gt;var sitePreset = "site-dashboard";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var shortName = "helloworld";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var title = "Hello World";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var description = "The Hello World site!";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var visibility = siteService.PUBLIC_SITE;&lt;BR /&gt;var myNewSite = siteService.createSite(sitePreset, shortName, title, description,&amp;nbsp;&amp;nbsp; visibility);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 10:35:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291030#M244160</guid>
      <dc:creator>svetlingulev</dc:creator>
      <dc:date>2014-08-03T10:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run js script with cron from scheduled-jobs-context.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291031#M244161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;the problem is resolved. I used the Script Action Example at the end of this page &lt;/SPAN&gt;&lt;A href="https://wiki.alfresco.com/wiki/Scheduled_Actions" rel="nofollow noopener noreferrer"&gt;https://wiki.alfresco.com/wiki/Scheduled_Actions&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;and just changed the place and the name of the script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 13:09:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/run-js-script-with-cron-from-scheduled-jobs-context-xml/m-p/291031#M244161</guid>
      <dc:creator>svetlingulev</dc:creator>
      <dc:date>2014-08-04T13:09:10Z</dc:date>
    </item>
  </channel>
</rss>

