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 > <webobjects-dev@lists.apple.com> 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 >> <webobjects-dev@lists.apple.com> wrote: >> >> Hi Jesse, >> >> On 12 Feb 2025, at 10:34, Jesse Tayler via Webobjects-dev >> <webobjects-dev@lists.apple.com> 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 (Webobjects-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com >> >> This email sent to jtay...@oeinc.com > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/samuel%40samkar.com > > This email sent to sam...@samkar.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com