• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quartz Scheduler -- Clustering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quartz Scheduler -- Clustering


  • Subject: Re: Quartz Scheduler -- Clustering
  • From: Samuel Pelletier via Webobjects-dev <email@hidden>
  • Date: Wed, 12 Feb 2025 07:15:52 -0500

Hi Jesse,

I use ERQuartzScheduler in some apps, there is a Readme file in the source
documentation folder that explain the basics. In my case, I start the scheduler
on only one instance and add a entity to have the Job schedule persists in the
database.

Running multiple instances of a scheduler require some sort of synchronization
between instance to make sure things are appalling as expected (no parallel
runs if not supported, correct schedule, etc...) so there is some configuration
to do at quartz level. I did not went into this trouble and simply use a
property to select the instance that should run the scheduler. My default
property file has this entry to pause all jobs at startup:
er.quartzscheduler.triggersAutomaticallyPaused=true

You should probably use quartz directly if you want more advanced setup, just
don't forget to manage locking if you use EOF in your tasks by subclassing
ERXTask for example.

Regards,

Samuel



> Le 11 févr. 2025 à 21:46, Jesse Tayler via Webobjects-dev
> <email@hidden> a écrit :
>
> Thanks Paul!
>
> It IS ERQuartzScheduler.framework but having never gotten it fully working, I
> cannot say if it was a good idea or not. I do have a scheduler job and that
> populates a number of email jobs, no real reason for the emails being jobs
> but it’s working and I suppose it’s a good idea.
>
> The scheduler just fetches and processes and sends notifications as things
> progress. Typical stuff I’d imagine.
>
> I don’t see why I cannot implement this Redis thing — although I feel like I
> must be so close and why would this framework not properly cluster?
>
> I’m puzzled
>
>> On Feb 11, 2025, at 9:22 PM, Paul Hoadley via Webobjects-dev
>> <email@hidden> wrote:
>>
>> Hi Jesse,
>>
>> On 12 Feb 2025, at 10:34, Jesse Tayler via Webobjects-dev
>> <email@hidden> wrote:
>>
>>> I’m trying to get Quartz Scheduler working in my project and was able to
>>> create jobs and a scheduler to call for them to be produced and put into
>>> queue - all runs well.
>>>
>>> However, I worry that I’m not in Cluster-capable mode? RAM only?
>>>
>>> If I print out a few meta properties from the scheduler, I see I’m on the
>>> RAM store
>>>
>>> TruAnonSchedulerJob Scheduler Name: DefaultQuartzScheduler
>>> TruAnonSchedulerJob Scheduler Instance ID: NON_CLUSTERED
>>> TruAnonSchedulerJob Job Store Class: class org.quartz.simpl.RAMJobStore
>>> TruAnonSchedulerJob Thread Pool Size: 10
>>
>> Yes, you're using a RAMJobStore there, which means a distinct JobStore per
>> app instance or JVM.
>>
>>> I did not see reason to use EOs for my Job but now I think this is the
>>> Wonder way to cluster? Use the database?
>>
>> If you're talking about Wonder's ERQuartzScheduler.framework, then I don't
>> use it and I can't help you. You can certainly use the database as a
>> JobStore—I assume that's part of ERQuartzScheduler's functionality, but I'm
>> just guessing.
>>
>>> Multiple instances? I worry they will each send out email if I use only RAM?
>>
>> Yep, if you set up the same jobs with the same schedules in every app
>> instance using a RAMJobStore, you'll get duplicate job execution.
>>
>> If all you want is a reliable, persistent JobStore not bound to a specific
>> JVM or app instance, we've been using (a fork of) RedisJobStore (with Amazon
>> ElastiCache) for years now:
>>
>> https://notes.logicsquad.net/2018/10/25/delayed-job-execution-with-quartz-and-elasticache/
>>
>>
>> --
>> Paul Hoadley
>> https://logicsquad.net/
>> https://www.linkedin.com/company/logic-squad/
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Quartz Scheduler -- Clustering
      • From: Jesse Tayler via Webobjects-dev <email@hidden>
References: 
 >Quartz Scheduler -- Clustering (From: Jesse Tayler via Webobjects-dev <email@hidden>)
 >Re: Quartz Scheduler -- Clustering (From: Paul Hoadley via Webobjects-dev <email@hidden>)
 >Re: Quartz Scheduler -- Clustering (From: Jesse Tayler via Webobjects-dev <email@hidden>)

  • Prev by Date: Problems creating new Project
  • Next by Date: That pesky Amount read didn't match content-length ...
  • Previous by thread: Re: Quartz Scheduler -- Clustering
  • Next by thread: Re: Quartz Scheduler -- Clustering
  • Index(es):
    • Date
    • Thread