cancel
Showing results for 
Search instead for 
Did you mean: 

Problem debugging webscripts

damiar
Champ in-the-making
Champ in-the-making
Hi all,

I'm having problems every time I want to debug some webscript.

When I turn on the webscripts debugger it comes to front every 10-30 seconds because a script called "scheduled_removeHold.js". I don't really know what this script does (it comes with the default setup of Alfresco 3 Labs), but I cannot debug any of my webscripts because when I'm inspecting the code Alfresco executes scheduled_removeHold.js and the window that I'm watching disappears.

So, I would like to know how to avoid this behavior or how to disable this script.

Thanks in advance!
3 REPLIES 3

mikeh
Star Contributor
Star Contributor
That scheduled script is part of the Records Management module, but should only be running at 2:30am each day.

If you haven't changed any of the RM config, it might be worth raising as a bug in JIRA.

Thanks,
Mike

damiar
Champ in-the-making
Champ in-the-making
Ok, but could you tell me please what should I do to avoid this behavior? It is the default installation, I didn't change anything on the RM module.

damiar
Champ in-the-making
Champ in-the-making
Well, I forgot to answer the question.
I found the error: the arguments that Alfresco is using to "cron" this task are wrong.

Here's the workaround:

1- Shut down Alfresco.
2- Go to ALF_HOME/tomcat and delete /temp and /work
3- Go to ALF_HOME/tomcat/webapps/ and delete /alfresco
4- Then open the alfresco.war file with any zip file manager (like 7Zip, WinRAR, etc).
5- Once you are navigating the war file, go to /web-inf/classes/alfresco/module/org.alfresco.module.RecordsManagement/context/
6- Open script-context.xml
7- Make a search for the string "Execute @ 2:30 am every day" (you should find two) and modify each "value" tag to any other value (I've used "30 2 * * * ?" without quotes and it worked fine). This value is the argument of the cron command, so if you need more information you can read the man pages for cron.

Cheers!