In general, the points of continuity make a $G_\delta$ set (a countable intersection of open sets), so the points of discontinuity are an $F_\sigma$ set (a countable union of closed sets). So, unless we are really lucky, there ought to be some function that has a $F_\sigma$ but not closed set of discontinuities. The simplest kind of non-closed $F_\sigma$ set consists of a convergent sequence that does not include its limit point, such as $(1/n)$.
To make a function that is discontinuous only on points of the form $1/n$, take an atomic measure $\mu$ with weight $2^{−n}$ at $1/n$ and no weight elsewhere, and let $f(x)=\int_{-\infty}^x 1\,d\mu$. This will be discontinuous at each $1/n$ because of the point mass. The only other point where $f$ could conceivably be discontinuous is $x=0$, but it is not hard to show it's continuous there, because $\sum 2^{-n}$ converges.
This cumulative distribution method is guaranteed to make an increasing $f$ because the cumulative distribution of any measure is increasing. It also has the benefit that we don't need to specify the function by cases, or explicitly write any intervals in the definition of $f$, because the integral takes care of everything.
The converse question is: is every $F_\sigma$ set of reals the set of points of discontinuity of some function? That is, is every $G_\delta$ set of reals the set of points of continuity of a function? The answer is yes, as shown by Young in 1903; see this MathOverflow post for more information.
Young's result will not hold for monotonic functions, however, because the set of points of discontinuity of a monotonic function is countable, so even a simple uncountable closed set like the Cantor set cannot be the set of points of discontinuity of a monotone function. However, Rudin, Principles of Mathematical Analysis, 3rd ed., Remark 4.31 shows that every countable set of real numbers is the set of points of discontinuity of a monotone function, using the same cumulative distribution method.