All Products
Search
Document Center

SchedulerX:SchedulerxWorker parameters

Last Updated:Dec 05, 2023

This topic describes SchedulerxWorker parameters.

The following table describes SchedulerxWorker parameters.

Parameter

Description

Default value

setEndpoint(String endpoint)

Specifies the endpoint in a specific region.

None

setNamespace(String namespace)

Specifies the ID of the namespace.

None

setGroupId(String groupId)

Specifies the application ID (group ID) when the agent is used to connect the application. The application ID is generated during application creation.

None

setAliyunAccessKey(String aliyunAccessKey)

Specifies the AccessKey ID of the Alibaba Cloud account. You do not need to set this parameter if you use appKey.

None

setAliyunSecretKey(String aliyunSecretKey)

Specifies the AccessKey secret of the Alibaba Cloud account. You do not need to set this parameter if you use appKey.

None

setEnableBatchWork(boolean enableBatchWork)

Specifies whether to enable grid computing. The default value is true, indicating that grid computing is enabled.

  • If grid computing is not used, we recommend that you do not set the value to true.

  • If grid computing is used, we recommend that you set the value to true. Otherwise, the first triggering of a job on each worker will be delayed for at least 20 seconds.

true

setHost(String host)

Specifies the IP address of the application. The IP address that is obtained by default may be incorrect when multiple network interface cards or virtual private networks (VPNs) are used. In this case, you need to set this parameter.

None

setPort(int port)

Specifies the port on which the application listens.

None

setClassLoader(ClassLoader userClassLoader)

Specifies a custom class loader that may be required for a non-Spring application that uses a third-party framework.

None

setBlockAppStart(boolean block)

Specifies whether to block the startup of the application process if SchedulerX fails to complete the initialization.

None

setSlsCollectorEnable(boolean enable)

Specifies whether to enable Simple Log Service (SLS).

True

setShareContainerPool(boolean shareConatinerPool)

Specifies whether to allow all jobs in the application to share the container pool. We recommend that you set the value to true in scenarios where a large number of jobs are concurrently scheduled.

False

setSharePoolSize(intsharePoolSize)

The size of the pool if you allow all jobs to share the container pool.

64

setLabel(String label)

Specifies labels to be added to the application during startup of the application so that you can use labels to specify workers for job management. This feature is suitable for canary release and stress testing scenarios.

None

setMapMasterStatusCheckInterval(int interval)

The interval at which SchedulerX checks whether all tasks are completed in the Map model. Unit: milliseconds. If you want to increase the frequency at which second-delay jobs are triggered, configure this parameter.

3000

setEnableSecondDelayCycleIntervalMs(boolean enable)

Sets the unit of the delay to milliseconds for second-delay jobs. If you set this parameter to true, the unit of the delay in the console is changed from seconds to milliseconds. This way, the frequency at which second-delay jobs are triggered is increased.

false

setGraceShutdownMode(String mode)

Specifies the graceful shutdown mode. If you do not configure this parameter, the graceful shutdown mode is disabled. Valid values:

  • WAIT_ALL: An application is closed only after all received jobs and tasks are complete.

  • WAIT_RUNNING: An application is closed after running jobs and tasks to which threads are allocated are complete.

None

setGraceShutdownTimeout(long delay)

Specifies the shutdown grace period. Unit: seconds. If you do not configure this parameter or set this parameter to a value less than or equal to 0, graceful shutdown does not work.

None