How to reserve a slot or machine for special jobs

Suppose you have a type of job known as a "Pickle" job and you want to dedicate a specific slot or machine to running this type of job. The following example is one way to achieve this. Since this example adds to the existing START expression, be sure to insert it after START is first defined or merge the two definitions together. Place the following in the configuration file of the special machine:

#Advertise that this machine is for "Pickle" jobs
IsPickleSlot = True

# this machine only runs "Pickle" jobs
START = ($(START)) && (MY.IsPickleSlot =!= True || TARGET.IsPickleJob =?= True)

In the job submit file:

+IsPickleJob = true
requirements = TARGET.IsPickleSlot

If you only want specific slots on the machine to be for Pickle jobs, you can adjust the setting of IsPickleSlot on a per-slot basis. Example:

SLOT1_IsPickleSlot = True
SLOT2_IsPickleSlot = False

Alternate STARTD configuration for HTCondor 8.2 or later

In HTCondor 8.2 or later, a different START expression can be set for each slot type. Use the same submit file statements as the above, but change the STARTD condifig to this:

# create two types of slots, normal and pickle

# type 2 slots only run pickle jobs.
SLOT_TYPE_2_START = $(START:True) && (TARGET.IsPickleJob =?= True)

#Advertise type 2 slots for "Pickle" jobs
IsPickleSlot = SlotTypeId==2

Starting with HTCondor 8.3.8, attributes can also be advertised per-slot type, so this example could be simplified even further on 8.3.8 by replacing the last 3 statements in the above config block to this:

#Advertise type 2 slots for "Pickle" jobs using 8.3.8 features
SLOT_TYPE_2_IsPickleSlot = true