Multiple "Scheduled Tasks" issues with CUBA legacy-support and Jmix

Jmix version: 1.1.2
Jmix Studio plugin version: 1.1.4-213
IntelliJ IDEA 2021.3 CE - Build #IC-213.5744.223, built on November 27, 2021
Operating System: macOS 12.0.1 (21A559)
File System: Case-Sensitive Journaled HFS+ (APFS)
Datebase: PostgreSQL 13

Hi Everyone

I was trying to test a Scheduled Task that I originally developed in CUBA and found the following issues with both the legacy CUBA “Scheduled Tasks” support (1 - 5) and the new Quarz implementation (6 and 7).

And after my initial 1 - 5 findings listed below, I found the following statement from Natalia here - Administration menu

We made the decision to stop support for our scheduled tasks engine and use instead.

So maybe points 1 - 5 are no longer relevant but if that’s the case, I would not expect to find this legacy implementation in Jmix, so this situation is not completely clear to me. Do you intend to use the Scheduled Tasks screen with the new Quarz backend in the future or are we expected to create our own UI for our Quarz implementation?

  1. In the Scheduled Tasks screen it is only possible to find beans that have an Interface definition. My CUBA-to-Jmix migration removed my Interfaces and generating a new bean (Component) does not generate an Interface source file, so you have to manually create one if you want to use it as a Scheduled Task with the Bean selection.

  2. When I try and run my Scheduled Task I receive this error…

2022-01-09 19:46:09.897 ERROR 11881 — [nio-8080-exec-1] c.h.c.w.a.s.ScheduledTaskBrowser : Can’t execute ScheduledTask{beanName=nf_MembershipService, methodName=expireAllMemberships, className=null, scriptName=null, singleton=true, period=36000, startDate=2022-01-10 00:00:00.000, cron=null}: not in permitted hosts or not a master.

I do not have this problem with CUBA (I leave the “Permitted Servers” field blank) and tried setting the “Permitted Servers” to localhost and to my computer’s hostname in Jmix but that did not have any affect.

  1. And when I receive the error notification the message in point 2, the text contents are missing:


  1. The Scheduled Tasks “User Name” is not a mandatory field but if I do enter a User, e.g. admin, I cannot remove it later. Notice that the screen components are different in CUBA and Jmix:



  1. And I when I try to “Remove” my Scheduled Task, I receive this NPE after pressing the OK button in the confirmation dialog…

at com.haulmont.cuba.gui.components.actions.RemoveAction.doRemove(
at com.haulmont.cuba.gui.components.actions.RemoveAction.remove(
at com.haulmont.cuba.gui.components.actions.RemoveAction.lambda$confirmAndRemove$0(
at io.jmix.core.common.event.EventHub.publish(
at io.jmix.ui.action.BaseAction.actionPerform(
at io.jmix.ui.sys.DialogsImpl$OptionDialogBuilderImpl.lambda$show$0(
at io.jmix.ui.widget.JmixButton.fireClick(
at com.vaadin.ui.Button$
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
at java.base/java.lang.reflect.Method.invoke(
at com.vaadin.server.ServerRpcManager.applyInvocation(
at com.vaadin.server.ServerRpcManager.applyInvocation(
at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(
at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(
at com.vaadin.server.VaadinService.handleRequest(
at com.vaadin.server.VaadinServlet.service(
at javax.servlet.http.HttpServlet.service(

  1. In the Jmix Quartz documentation Quartz Job Scheduler Setup :: Jmix Documentation it states that you should add the following line to the file… = qrtz_

However, the already contains the following similar definition…,email_,sec_,sys_,ui_

so I assume that the documentation needs to be updated(?) and that I may set the property as follows…,email_,sec_,sys_,ui_,qrtz_

Which is correct excludePrefixes or exclude-prefixes or both?

  1. After following the steps for the Quartz implementation (for my Postgres config.) I receive the following log message at startup…

2022-01-09 11:15:51.385 INFO 8604 — [ main] s.a.ScheduledAnnotationBeanPostProcessor : More than one TaskScheduler bean exists within the context, and none is named ‘taskScheduler’. Mark one of them as primary or name it ‘taskScheduler’ (possibly as an alias); or implement the SchedulingConfigurer interface and call ScheduledTaskRegistrar#setScheduler explicitly within the configureTasks() callback: [core_ThreadPoolTaskScheduler, ui_ThreadPoolTaskScheduler]

What should I do to correct this?

That’s it (so far). Sorry for so many items but I hope that this information is useful.

Best regards