There are Fourier series representations for a number of non-periodic functions such as the following:
(1) $\quad\pi(x)$ - the fundamental prime counting function
(2) $\quad\Pi(x)$ - Riemann's prime-power counting function
(3) $\quad\vartheta(x)$ - the first Chebyshev function
(4) $\quad\psi(x)$ - the second Chebyshev function
(5) $\quad U(x)=-1+\theta(x+1)+\theta(x-1)$ - where $\theta(x)$ is the Heaviside step function
I believe the following link provides a fair amount of insight into the theory and value of Fourier series representations of non-periodic functions.
Fourier Series Representation of $U(x)$
To more precisely answer the specific question, assuming the ratio of the periods of the two functions is not rational, then the sum of their Fourier series doesn't converge when evaluated at finite evaluation limits. A conditional convergence requirement for sums of Fourier series is that all Fourier series must be evaluated to exactly the same frequency, and this condition can not be met if the ratio of the periods of the two functions is irrational.
For example consider the following two functions:
(6) $\quad f(x)=\operatorname{SawtoothWave}(\frac{x}{3})=\frac{1}{2}-\frac{1}{\pi}\sum\limits_{k=1}^\infty\frac{\sin\left(\frac{2\,k\,\pi\,x}{3}\right)}{k}$
(7) $\quad g(x)=\operatorname{SawtoothWave}(\frac{x}{5})=\frac{1}{2}-\frac{1}{\pi}\sum\limits_{k=1}^\infty\frac{\sin\left(\frac{2\,k\,\pi\,x}{5}\right)}{k}$
When evaluated at finite limits, the sum $f(x)+g(x)$ must be evaluated as follows where the evaluation frequency $f$ is assumed to be a positive integer:
(8) $\quad f(x)+g(x)=\sum\limits_{n\in\{3,5\}}\frac{1}{2}-\frac{1}{\pi}\sum\limits_{k=1}^{f\,n}\frac{\sin\left(\frac{2\,k\,\pi\,x}{n}\right)}{k}$