Job Observation

Hi,

I had created 10 jobs to run on cron basis and deployed the same on tomcat server.
Since 10 crons are created every time user access the Quartz Job menu he will get to display 10 created crons list.

And if i try to deployed the same instance with creating 11th cron then 11 crons will be displayed on Quartz Job Menu.

Cant we enable only those crons required to work on the instances.
Suppose two scheduler instances are deployed on tomcat and total 11 crons are created to execute.
I want one instance to run only 3 crons and other instance to run 8 crons.

As it get difficult to run same instance in parallel and both are executing same cron threads and using memory.

public class alerts implements Job {
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
}
}

Hi,

Currently it is designed to work with single Scheduler provided by Spring boot quartz.

Can you add more details about your expectations of application behavior (at configuration and runtime stages)?

Regards,
Ivan

Every instance deployed on tomcat are pointing to same single database.

If i am doing some development in parallel and since both scheduler instance will share the same running crons created in the database. Concurrency issue can occur so i would require something like application will run as per the cron which is define in the application. It will not execute all cron created in the system.

Below is some Spring MVC example i had created below task in my scheduler if dont want run particular cron i will comment this cron service in that war.

<task:scheduled-tasks>
		<task:scheduled ref="service"
			method="emailSend" cron="1 * * * * *" />
	</task:scheduled-tasks>

Hi,

Maybe you need to define different schedulers with different set of tables in the same database.

On Jmix side Quartz addon has property in liquibase changelog to define prefix for quartz tables:

<property name="table_prefix" value="QRTZ_"/>

Quartz Scheduler itself also has similar property

org.quartz.jobStore.tablePrefix = QRTZ_

Because Spring Boot Quartz is used its ‘native’ property should be specified with spring.quartz.properties prefix so it should be spring.quartz.properties.org.quartz.jobStore.tablePrefix.

Modify those properties and each Jmix application instance will have its own scheduler with own set of tables and they should work without intersection.

Regards,
Ivan