1

Need to run scheduler task on cluster environment. If cluster has 4 nodes say, node-1, node-2, node-3, node-4.

My scheduler always run on the node-1 only in all cases. Is there any configuration for scheduler task run in particular node only.

I have followed this blog.

https://web.liferay.com/web/user.26526/blog/-/blogs/liferay-7-ce-liferay-dxp-scheduled-tasks

Ravi R
  • 73
  • 1
  • 11

2 Answers2

1

You have only options to run it on a node or all nodes. You can't define what node should it be run on.

The scheduler is handled by Quartz. Select node in Quartz cluster to execute a job

Miroslav Ligas
  • 1,287
  • 8
  • 22
0

If you want to run the scheduler only on a single node. You can create the Job manually on your bundle activation callback with StorageType.MEMORY and deploy that module only on that (desired) host. However, this will make deployments more complicated.

Andre Albert
  • 1,386
  • 8
  • 17