Skip to content

Instantly share code, notes, and snippets.

@douglascrp
Forked from AFaust/dumpHeap.js
Last active August 30, 2017 12:00
Show Gist options
  • Save douglascrp/534e52fbf43b16247d8d to your computer and use it in GitHub Desktop.
Save douglascrp/534e52fbf43b16247d8d to your computer and use it in GitHub Desktop.
How to trigger Alfresco LDAP sync with JavaScript
var ctxt, scheduler;
// get Spring context and Quartz scheduler
ctxt = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
scheduler = ctxt.getBean('schedulerFactory', Packages.org.quartz.Scheduler);
// fire (unless explicitly defined in Job detail Spring bean, scheduler group is always DEFAULT)
scheduler.triggerJob('ldapPeopleJobDetail', 'DEFAULT');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment