Variable time-based configuration is used to automatically change LSF License Scheduler configuration in lsf.licensescheduler based on time windows. For example, if you have design centers in remote locations, one use of time-based configuration is to switch ownership of license tokens based on local time of day.
You define automatic configuration changes in lsf.licensescheduler by using if-else constructs and time expressions. After you change the files, reconfigure the cluster with the bladmin reconfig command.
The expressions are evaluated by LSF License Scheduler every 10 minutes based on bld start time. When an expression evaluates true, License Scheduler dynamically changes the configuration based on the associated configuration statements and restarts bld
In the following examples, the #if, #else, #endif keywords are not interpreted as comments by License Scheduler, but as if-else constructs.
To specify a time value, a specific point in time, specify at least the hour. Day and minutes are optional.
integer from 0 to 59, representing the minute of the hour.
If you do not specify the minute, License Scheduler assumes the first minute of the hour (:00).
integer from 0 to 7, representing the day of the week, where 0 represents every day, 1 represents Monday, and 7 represents Sunday.
If you do not specify the day, License Scheduler assumes every day. If you do specify the day, you must also specify the minute.
To specify a daily window omit the day field from the time window. Use either the hour-hour or hour:minute-hour:minute format. For example, to specify a daily 8:30 a.m. to 6:30 p.m window:
To specify an overnight window make time1 greater than time2. For example, to specify 6:30 p.m. to 8:30 a.m. the following day:
To specify a weekend window use the day field. For example, to specify Friday at 6:30 p.m to Monday at 8:30 a.m.:
Time expressions use time windows to specify when to change configurations.
A time expression is made up of the time keyword followed by one or more space-separated time windows enclosed in parenthesis. Time expressions can be combined using the &&, ||, and ! logical operators.
Both of the following expressions specify weekends (Friday evening at 6:30 p.m. until Monday morning at 8:30 a.m.) and nights (8:00 p.m. to 8:30 a.m. daily).
The if-else construct can express single decisions and multi-way decisions by including elif statements in the construct.
The syntax for constructing if-else expressions is:
The #endif part is mandatory and the #else part is optional.
#
# ProjectGroup section
#
Begin ProjectGroup
GROUP SHARES OWNERSHIP LIMITS NON_SHARED
(group1 (A B)) (1 1) (5 -) () ()
End ProjectGroup
Begin ProjectGroup
GROUP SHARES OWNERSHIP LIMITS NON_SHARED
(group2 (A B)) (1 1) (- 5) () ()
End ProjectGroup
#
# Feature section
#
Begin Feature
NAME = f1
#if time(5:16:30-1:8:30 20:00-8:30)
GROUP_DISTRIBUTION=group1
#elif time(3:8:30-3:18:30)
GROUP_DISTRIBUTION=group2
#else
GROUP_DISTRIBUTION=group2
#endif
SERVICE_DOMAINS=Lan1 Lan2
End Feature