Declare a job to be executed periodically (see also T and J).
- Arguments
[OPTIONS] args
- Description
- Creates a periodic job using J (uses capsule if
present). Periodic jobs run with a default period of
$period, but will adjust future runs according
to how long the job takes to complete. The range of the period is
defined by $minperiod and
$maxperiod.
-
- Option
- Description
- -period TIMESPEC
- Specify target period of job. This is the period with
which the job is scheduled. If there are enough
resources, it will also be the period with which the job
is executed, else the job may have to be queued.
- -min TIMESPEC
- Allow period to be reduced down to this minimum period.
This happens if the job is quick enough.
- -max TIMESPEC
- Allow period to be increased up to this maximum period.
This happens if the job takes a long time to execute.
The max period is also used to kill the job if it takes
longer than max period.
- -P TIMESPEC
- Short cut specification of period, min period, max
period, and autokill, where, with $P set to the
TIMESPEC, min period is set to $P, max period is set to
10*$P and autokill is set to 3*$P.
- -autokill TIMESPEC
- Kill job if it runs for longer than the specified
amount. If this is greater than the maximum period, then
the job will be killed if it runs for more than the
maximum period.
- -resources RESOURCE_SPEC
- Override resource specification for the job. By default,
this is the empty list.
- -env ENV_SPEC
- Override environment specification for the job.
- -cal CALENDAR_SPEC
- Specify when the job is allowed to be executed. A
CALENDAR_SPEC consists of two comma-separated lists
joined by a colon. The part to the left of the colon
expreses the days, and the part to the right specifies
the hours, 0..23. Days are numbered 0..7 with 0 for
Sunday. A CALENDAR_SPEC format example is:
Sun,Mon,Tue:1,2,3,4 which states that the job can be
executed on Sunday, Monday, and Tuesday, at the hours of
1AM, 2AM, 2AM 4AM. This option works in conjunction with
the period settings describe above. Other CALENDAR_SPEC
examples are:0,1,2:* - Sunday, Monday, and Tuesday, all
hours.*:15,21 - All days, at 3pm and 9pm.
- -systemjob
- The job is considered "systemjob" (not keeping server
up). If not declared as a systemjob, this job might
prevent auto shutdown of an idle project, if the period
of the PJ is shorter than the auto shutdown interval.
Please note that the setting of make(systemjob) is not
used to determine if the PJ is a system job or not. You
must use this flag to declare this periodic job to be a
system job.
- Example
-
PJ -period 1h updateSomeFile
PJ -period 1h -min 40m -max 2h -autokill 2m \
-resources linux -env BASE updateSomeFile
E BASE
R linux
PJ -P 1m date
set make(jobname) "$tag"
set make(nojournal) 1
PJ -P 30s -systemjob ftlm_parse_flexlm ...