An image forming apparatus includes a job memory which stores each of
image formation jobs, which are received from terminals, in association
with a user identifier which identifies a user of a corresponding
terminal, an image forming unit which executes the image formation jobs
which are stored in the job memory, a user detector which detects a user
identifier of each approaching user, and a controller which calculates,
upon detection of plural user identifiers by the user detector, elapsed
times from reception times of image formation jobs which are stored in
the job memory in association with the user identifiers, compares the
elapsed times, and controls the image forming unit to preferentially
execute the image formation job with a shortest one of the elapsed times.