  We introduce a new notion of a periodic pencil of flat connections on a
smooth algebraic variety $X$. This is a family $\nabla(s_1,...,s_n)$ of flat
connections on a trivial vector bundle on $X$ depending linearly on parameters
$s_1,...,s_n$ and generically invariant, up to isomorphism, under the shifts
$s_i\mapsto s_i+1$ for all $i$. If in addition $\nabla$ has regular
singularities, we call it a quasi-motivic pencil. We use tools from complex
analysis to establish various remarkable properties of such pencils over
$\mathbb C$. For example, we show that the monodromy of a quasi-motivic pencil
is defined over the field of algebraic functions in $e^{2\pi is_j}$, and that
its singularities are constrained to an arrangement of hyperplanes with integer
normal vectors. Then we show that many important examples of families of flat
connections, such as Knizhnik-Zamolodchikov, Dunkl, and Casimir connections,
are quasi-motivic and thus periodic pencils.
  Besides being interesting in its own right, the periodic property of a pencil
of flat connections turns out to be very useful in computing the eigenvalues of
the $p$-curvature of its reduction to positive characteristic. This will be
done in our forthcoming paper.
