Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: Quartz

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: Quartz

Chronological Thread 
  • From: Chris Hyzer <>
  • To: "Imholz, John J." <>, "''" <>
  • Subject: [grouper-users] RE: Quartz
  • Date: Thu, 18 Nov 2010 13:11:03 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US

So you are running the loader command line right?

Note, in GSH you can kick off a loader job that takes scheduling out of the

grouperSession = GrouperSession.startRootSession();
loaderGroup = GroupFinder.findByName(grouperSession, "stem:group");

You can see a log of the loader in the grouper_loader_log table, you should
see a row for each job (I think manual or otherwise)

Here is a simple example of the loader:

Create a table for employees (note, in reality this would be a view)

CREATE TABLE cmu_employee (
employee_id varchar(50) NOT NULL,
PRIMARY KEY (employee_id)

Populate with some employees:

insert into cmu_employee (employee_id) values ('elbl');
insert into cmu_employee (employee_id) values ('dousti');
insert into cmu_employee (employee_id) values ('elbr');
insert into cmu_employee (employee_id) values ('elbu');
insert into cmu_employee (employee_id) values ('ben');
insert into cmu_employee (employee_id) values ('fibe');
insert into cmu_employee (employee_id) values ('fibl');
insert into cmu_employee (employee_id) values ('fibr');

Create an employee group:

gsh 18% employeesGroup = new

Add a loader job to auto-populate students:

gsh 19% groupAddType("edu:cmu:community:employees", "grouperLoader");
gsh 20% setGroupAttr("edu:cmu:community:employees", "grouperLoaderType",
gsh 21% setGroupAttr("edu:cmu:community:employees", "grouperLoaderDbName",
gsh 22% setGroupAttr("edu:cmu:community:employees",
"grouperLoaderScheduleType", "CRON");
gsh 23% setGroupAttr("edu:cmu:community:employees",
"grouperLoaderQuartzCron", "0 0 7 * * ?");
gsh 24% setGroupAttr("edu:cmu:community:employees", "grouperLoaderQuery",
"SELECT employee_id AS subject_id, 'jdbc' AS subject_source_id FROM

Run the loader one time to init:

gsh 25% employeesGroup = GroupFinder.findByName(grouperSession,
"edu:cmu:community:employees", true);
gsh 26% loaderRunOneJob(employeesGroup);

Kick off the job and run loader automatically so it runs daily:

bin]$ cd /opt/grouper/1.6.1/grouper.apiBinary-1.6.1/bin
bin]$ ./ -loader > /tmp/grouper.1.6.1_loader.log 2>&1 &

See that the group has the people it should:

gsh 27% employeesGroup = GroupFinder.findByName(grouperSession,
"edu:cmu:community:employees", true);

gsh 28% employeesGroup.getMembers();
member: id='elbl' type='person' source='jdbc'
member: id='dousti' type='person' source='jdbc'
member: id='fibr' type='person' source='jdbc'
member: id='elbu' type='person' source='jdbc'
member: id='ben' type='person' source='jdbc'
member: id='fibe' type='person' source='jdbc'
member: id='fibl' type='person' source='jdbc'
member: id='elbr' type='person' source='jdbc'

-----Original Message-----

On Behalf Of Imholz, John J.
Sent: Thursday, November 18, 2010 1:02 PM
Subject: [grouper-users] Quartz

I'm having some trouble getting a group loaded (no SQL error, no log message
at all.)

How do I query what's currently scheduled?


Archive powered by MHonArc 2.6.16.

Top of Page