Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] RE: Schedule a job to run later via quarts and java?

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] RE: Schedule a job to run later via quarts and java?


Chronological Thread 
  • From: Shilen Patel <>
  • To: "Hyzer, Chris" <>, "Black, Carey M." <>, " Mailing List" <>
  • Subject: Re: [grouper-users] RE: Schedule a job to run later via quarts and java?
  • Date: Mon, 24 Sep 2018 11:44:00 +0000
  • Accept-language: en-US
  • Authentication-results: oit.duke.edu; spf=none
  • Ironport-phdr: 9a23:45cv6B2n3tHy70KPsmDT+DRfVm0co7zxezQtwd8ZsesWLPvxwZ3uMQTl6Ol3ixeRBMOHs60C07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwdFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QKsqUjq+8ahkVB7oiD8GNzEn9mHXltdwh79frB64uhBz35LYbISTOfFjfK3SYMkaSHJBUMhPSiJBHo2yYYgBAOoAIelXoJLwqEESoRu7HwSgGPnixz1Oi3Tr3aM6yeMhEQTe0QI9H9IOsXDUo8vzNKwPS+661rXIwivHb/hL3jr984jIchElof6SW7J9atfeyVQsFwzblFmft5HqPy6M2+kLrmOV4e1gVee1hG4mrQF8ujevxt0rionUnoIa1ErE+T9jz4YtPd20UFZ7YcSjEJtXuSGaL4x2QsIkQ2F0oio11roGuZujcCgW1ZQn2xnfa+aGc4eS5hLvTfidLip8hH17Y7K/nBGy8U65xuHiS8a4zEtGojBFktnQs3AN0xre4dWERPtl5kqtxDaC2x7J5uxKO0w4iKnWJpo7zrIumJcfrFzPEjL2lUnolqObeF8o9+an5uj9bLjqvpGcOJF3hw3iN6kjn9GzDOQ4PwcTWmWW+/+z2bP58kD8QLhHjeA5nbTcvZ3UOMsXuqy0DglI2Yg58Rm/FS2p0NEAkHkHMl1FfBWHgpDsO17UIfD4Ce6zg1uikTty2/zLPqftApLMLnjfirvuYKt9601CxwYp099Q+o9UBqkAIPL1REDxqMTVAgI5PgCq2erqBs9x2p4dVG+LGKOVLq3fvUKQ6uIqOeaMZYsVuDjnK/gi4v7jlWQ5mV8cfamtw5QXbmu1Eel7I0Waf3XgmMkOHnoXvgYmVuzllEWCUSJPZ3a1R6886Ss7CIW7DYfbWI+tmqWN3DqgHpJIfGBGEUuBEXPpd4WfR/cMczyeLtVgkjwCSbiuVZUh1Rewuw/m1bZrNPTb9TAFtcGr6N8grc3ChxwosXRfD96cyCvFG2R/nnIaSiUe3bt051Flx1GFl6V0nqocXZZ54/pCUUNyHpfGwv0yLpa4ElbLet6CSxD/GI6OBiosCN893olKKwxyAdK/lh3ZmjexDqUOv72NGJEu9K/AhT78K9s17n/H0KgngBECQ9BTfyXyibR46hDeHcvUiEiDjI6rc7gRxijA6D3FwGaT6hJ2Sgl1BJ7FXHQSYAPupMj04guWVL+vDbkhGgdcysPEJ6dXPI66xW5aTevubYyNK1m6nH29UFPRnuvWNtjjZnkd0SPBCUMNjwEU+zOcOBMjAju6/j6MCz1yU17yYE6q/OVj+xbZL1QswVSMaEtsn6Gw5gZTgPWdT/0J2bdRoycgrzhyNFqg3N+QBtadqg==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Here’s an example of scheduling a one-off job to run in 10 minutes:

 

GrouperLoader.schedulerFactory().getScheduler().scheduleJob(TriggerBuilder.newTrigger().startAt(new Date(System.currentTimeMillis() + 600000)).forJob("MAINTENANCE__enabledDisabled").build())

 

- Shilen

 

On 9/23/18, 10:03 PM, " on behalf of Hyzer, Chris" < on behalf of > wrote:

 

    You can get a scheduler like this:

   

    Scheduler scheduler = GrouperLoader.schedulerFactory().getScheduler();

   

    Not sure exactly how to schedule a one-off... 

    

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

    From: <> On Behalf Of Black, Carey M.

    Sent: Friday, September 21, 2018 2:54 PM

    To: Mailing List <>

    Subject: [grouper-users] RE: Schedule a job to run later via quarts and java?

   

    Sorry.. wrong method ref... (copy/paste error...)

    

    Create a version of: edu.internet2.middleware.grouper.app.loader.GrouperLoader.scheduleOtherJobs()

                That calls:

                                --> edu.internet2.middleware.grouper.app.loader.GrouperLoader.scheduleJobIfNeeded(JobDetail, Trigger)

   

    

    --

    Carey Matthew

   

    

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

    From: <> On Behalf Of Black, Carey M.

    Sent: Friday, September 21, 2018 2:43 PM

    To: Mailing List <>

    Subject: [grouper-users] Schedule a job to run later via quarts and java?

   

    If I have a loader job ( or built in job ) is there a way to programmatically schedule it to run at some time in the future?

                ( Example: in 10 minutes from now run the Unresolvable Subject Deletion Utility (USDU)")

                I can do the USDU job via cron (or at) at the OS level, but it could be helpful to trigger such things from inside a Change Log Consumer or GSH scripts.

    

    Yes I know I can run them "now". (AKA loaderRunOneJob()) The trick that I am talking about here is to delay the "now" until "later". ( And to be really fancy, see if It was already scheduled so that the job is not run multiple times in a short period of time.)

   

    

    

    

    REF: https://urldefense.proofpoint.com/v2/url?u=http-3A__www.quartz-2Dscheduler.org_documentation_quartz-2D2.x_tutorials_tutorial-2Dlesson-2D01.html&d=DwIFAg&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=sWqutME58phurE0oO57Icg&m=wOBeCugrhIRTbBr05VnB3uc1dORgVfktE8EmRd3F6F0&s=sdlmAxhGJQKTsxR9dawRUCpoyYcR-MwPqE-x-K2_YdY&e=

    REF: I am looking at edu.internet2.middleware.grouper.app.loader.GrouperLoader.scheduleChangeLogTempToChangeLogJob()  as an example.

   

    Maybe another way to ask this might be:

                Is there an acceptable interface to get ahold of the Scheduler so that I could add a "local job" to it?

                Or is that "behind the curtain" and I should look elsewhere for my needs?

   

                Thinking about ideas like:

                                Custom reports/exports/checks that need to be triggered by user event and/or other run time conditions.

                                                Set an attribute "ReportRequest" = "EmailMeReport-GoodUsers" (on a group or folder context) and a report is run and an email shows up to the user.

                                Etc...

   

    --

    Carey Matthew

   

    

    




Archive powered by MHonArc 2.6.19.

Top of Page