How to delete jobs in grails/quartz...

View: New views
4 Messages — Rating Filter:   Alert me  

How to delete jobs in grails/quartz...

by john Sanabria-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have realized that the only method used for delete jobs in quartz is
Scheduler.delete(jobname,groupname).
I have created a job using the quartz plug-in. Then, I run multiple
instances of it with different parameters for every instance at the same
time.
Recall that every job instance has the same jobname and groupname since
quartz plug-in only deals with static jobs at this moment.

I want to develop a service to delete a specific job given its
jobname,groupname and parameters. (Last parameter, is different for
every instance).

Someone could provide me ideas/algorithms?

Thanks a lot,

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: How to delete jobs in grails/quartz...

by Sergey Nebolsin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi, John.

 
I assume that "I run multiple instances of it with different parameters for every instance at the same time" means that you created triggers manually and then scheduled jobs with Scheduler.scheduleJob(Trigger).

 
In this case you can give your triggers unique names and then delete them using Scheduler.unscheduleJob(String triggerName, String triggerGroup)

 
Cheers

On 7/22/08, John Sanabria <john.sanabria@...> wrote:
Hi,

I have realized that the only method used for delete jobs in quartz is Scheduler.delete(jobname,groupname).
I have created a job using the quartz plug-in. Then, I run multiple instances of it with different parameters for every instance at the same time.
Recall that every job instance has the same jobname and groupname since quartz plug-in only deals with static jobs at this moment.

I want to develop a service to delete a specific job given its jobname,groupname and parameters. (Last parameter, is different for every instance).

Someone could provide me ideas/algorithms?

Thanks a lot,

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





--
Sergey Nebolsin
Principal Software Engineer, Prophotos.ru

Re: How to delete jobs in grails/quartz...

by john Sanabria-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sergey,

> I assume that "I run multiple instances of it with different
> parameters for every instance at the same time" means that you created
> triggers manually and then scheduled jobs with
> Scheduler.scheduleJob(Trigger).
>
Yes, you're right. I have a term misconception.

>  
> In this case you can give your triggers unique names and then delete
> them using Scheduler.unscheduleJob(String triggerName, String
> triggerGroup)
>

OK, however, if my job is running and it doesn't stop because an I/O
delay, the "unscheduleJob" method stops the current job execution? I
read in the API that this method remove the trigger, but isn't clear
what happen with running jobs associated with the unscheduled trigger?

I remark that, because I want to stop/interrupt the running job but keep
the trigger for the future.

Thanks. :-)

> On 7/22/08, *John Sanabria* <john.sanabria@...
> <mailto:john.sanabria@...>> wrote:
>
>     Hi,
>
>     I have realized that the only method used for delete jobs in
>     quartz is Scheduler.delete(jobname,groupname).
>     I have created a job using the quartz plug-in. Then, I run
>     multiple instances of it with different parameters for every
>     instance at the same time.
>     Recall that every job instance has the same jobname and groupname
>     since quartz plug-in only deals with static jobs at this moment.
>
>     I want to develop a service to delete a specific job given its
>     jobname,groupname and parameters. (Last parameter, is different
>     for every instance).
>
>     Someone could provide me ideas/algorithms?
>
>     Thanks a lot,
>
>     ---------------------------------------------------------------------
>     To unsubscribe from this list, please visit:
>
>       http://xircles.codehaus.org/manage_email
>
>
>
>
>
> --
> Sergey Nebolsin
> Principal Software Engineer, Prophotos.ru


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: How to delete jobs in grails/quartz...

by Sergey Nebolsin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, Jonh

On 7/22/08, John Sanabria <john.sanabria@...> wrote:
Hi Sergey,

I assume that "I run multiple instances of it with different parameters for every instance at the same time" means that you created triggers manually and then scheduled jobs with Scheduler.scheduleJob(Trigger).

Yes, you're right. I have a term misconception.

 In this case you can give your triggers unique names and then delete them using Scheduler.unscheduleJob(String triggerName, String triggerGroup)


OK, however, if my job is running and it doesn't stop because an I/O delay, the "unscheduleJob" method stops the current job execution? I read in the API that this method remove the trigger, but isn't clear what happen with running jobs associated with the unscheduled trigger?

I remark that, because I want to stop/interrupt the running job but keep the trigger for the future.

 
Ah, sorry, I misunderstood. I'm not sure if the Quartz itself has such a feature, but I'll investigate further and post about results.

 
Cheers 

--
Sergey Nebolsin
Principal Software Engineer, Prophotos.ru
LightInTheBox - Buy quality products at wholesale price