Skip to content

Instantly share code, notes, and snippets.

View jgoldhammer's full-sized avatar

Jens Goldhammer jgoldhammer

View GitHub Profile
@jgoldhammer
jgoldhammer / alfresco jobs rootobject example.js
Last active December 25, 2015 07:48
Start a job via the jobs root object. You have to get the job first by its name and than can run the job. This action executes the "executeNow" function of the job Mbean in the jmx interface.
print(jobs.listJobs());
var job = jobs.getJob('tempFileCleanerTrigger');
job.run();
@jgoldhammer
jgoldhammer / alfresco simple batch processing example.js
Last active December 25, 2015 07:39
A first example to show the possibilities with the simple batch processing extension for alfresco javascript execution. It has the only limitation that the processorfunction must have the name process
var batchName ='MyProcessor';
var numberOfThreads = 4;
var numberOfProcessedItems = 10;
var runAsSystem = true;
var processorFunction = function process(node){
if(node.hasAspect('cm:titled')){
logger.error(node);
}
};