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: "Black, Carey M." <>
  • To: Shilen Patel <>, "Hyzer, Chris" <>
  • Cc: " Mailing List" <>
  • Subject: RE: [grouper-users] RE: Schedule a job to run later via quarts and java?
  • Date: Mon, 24 Sep 2018 14:00:14 +0000
  • Accept-language: en-US
  • Authentication-results: spf=pass (sender IP is 128.146.163.17) smtp.mailfrom=osu.edu; duke.edu; dkim=pass (signature was verified) header.d=osu.edu;duke.edu; dmarc=pass action=none header.from=osu.edu;
  • Authentication-results-original: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:AoJQiR/E63jcLv9uRHKM819IXTAuvvDOBiVQ1KB+0+gXIJqq85mqBkHD//Il1AaPAd2Eraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HRbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDtU7s6RSqt4LtqSB/wiScIKTg58H3MisdtiK5XuQ+tqwBjz4LRZoyeKfhwcb7Hfd4CRWRPQNtfVzBPDI2/YYsADesBMvpXoITmvVQCsQeyCBOwCO/zyDJFgGL9060g0+QmFAHLxAIsEs8KsHvOsNr1N78eWv2rwabS1zXMcfNX0ir65oTSfBwqvPaBUql0ccXL1UYvFBnJgkiOpYHrJD6V0f8Ns3WB4+V+SO2vlncqpgdsqTas3schkpfFiZgJxlzZ8Ch13Zs5KcC9RU51btOoDIdcuiSUN4RoTc4tXWRltSM4x7EYpJK3ZDYGxZU5yxLDbvGLb42F7g/5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en and Chris,

 

Thank you! That looks like what I want to schedule a job programmatically. J

 

And for the “really fancy, see if It was already scheduled” part:

                scheduler.checkExists(new JobKey(“NameOfJob”)) ß kind of like that

                Should tell me if the job is already scheduled. So I think I can “back off” if it is scheduled too. J

 

Time to get some code written. J

 

--

Carey Matthew

 

From: Shilen Patel <>
Sent: Monday, September 24, 2018 7:44 AM
To: Hyzer, Chris <>; Black, Carey M. <>; Mailing List <>
Subject: Re: [grouper-users] RE: Schedule a job to run later via quarts and java?

 

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, "" <> 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