You may want to limit the number of concurrent and queued jobs to values that vary depending on the time of day. Flexible scheduling loads different property values based on the system timestamp for the same property. The following properties support flexible scheduling:
- jobExecutionCoordinator.maxConcurrentJobs
- jobExecutionCoordinator.maxQueuedJobs
- agent.maxConcurrentTasks
You can specify hourly ranges for values by using the format for flexible scheduling: <property name>.<hour> = value. Specify a number for <hour> using a 24 hour format. For example, to specify 3 p.m., type 15.
When flexible scheduling is used in the daemon.properties file, the default value for jobExecutionCoordinator.maxConcurrentJobs or jobExecutionCoordinator.maxQueuedJobs specifies the value used starting at 12 a.m. every day. When an hourly value is specified (for example, jobExecutionCoordinator.maxConcurrentJobs.2), that value is effective until the next hourly value specified or until the next day starts, at 12 a.m.
For example, suppose you wanted to schedule the maximum number of concurrent tasks to be 20 from 12 a.m. to 2 a.m., 25 from 2 a.m. to 5 a.m., and 5 from 5 a.m. to 12 a.m. The value would then go back to 20 when the next day starts at 12 a.m. You would set the values as follows:
jobExecutionCoordinator.maxConcurrentJobs =20 jobExecutionCoordinator.maxConcurrentJobs.2=25 jobExecutionCoordinator.maxConcurrentJobs.5=5
Flexible scheduling works similarly for the agent.maxConcurrentTasks parameter in the agent.properties file. In the example here, the agent can run up to 10 concurrent jobs from 12 a.m. to 5 a.m., and 5 concurrent jobs from 5 a.m. until 12 a.m. the next day.
agent.maxConcurrentTasks=10 agent.maxConcurrentTasks.5=5