In writing up an idea for living on a Ringworld, I've come to an odd question; Is there a moment of decreased exposure to the sun? I've seen this question asked previously, but people simply refuted it by saying that, without any artificial means, you'd essentially have a continuous day. However, were the Ringworld to be rotating on its' axis, and it rotated so that the ring faced the sun along its' band, would the 'wall' of the ring not cast shade over the rest of the inner side of the ring? Or, would the thin nature of a ringworlds' shape still allow enough light into the inner band of the ring to qualify as day? It most likely wouldn't be as dark as a night on Earth, and would not last long, but would the rotation of the ring not be able to cause something similar to an eclipse?
I doubt the walls of a ringworld would cast a shadow. At interplanetary distances, light from the sun would basically be come straight down from the sky. If from the perspective of someone standing on the floor of the ringworld the sun is smaller than the width of the ringworld floor -- as I presume it would -- the light would be spreading "outward" from the sun, not "inward", so the shadow would be cast outside the ringworld, not inside. Do you see what I mean? If not I suppose I could draw a diagram and upload.
In Niven's book day and night were "simulated" by having a ring of "shadow squares" in an orbit smaller than the ringworld. Basically just huge squares that blocked the light from the sun. By setting the size and spacing of the shadow squares and choosing the correct orbit, you could have almost any schedule of day and night that you wanted.
First thing, the only spinning a ring habitat will do is the axial spin; there would be no way to get a spinning ring to also tumble so the sun sometimes hits the ring and sometimes doesn't, regardless whether the rim wall will or won't cast a shadow.
Second, if the habitat doesn't surround the star like Ringworld does, but instead is, say, about 1 AU away, and built to have a 24 hour rotation period, at least part of the orbit it would have a day-night cycle as different parts of the inner surface face the sun. Unfortunately, there would also be two periods per "year" when the ring is fully edge-on to the star, and the entire ring would be dark for weeks or months -- like a polar winter.
The simplest solution for a single habitat (vs. the contrarotating pairs O'Neill proposed, to cancel gyroscopic action) is what Niven wrote -- shadow squares. For a Ringworld, correctly sized and spaced squares, with some station keeping method (beyond the wires he wrote into the book) would allow a suitable day and night. For a habitat that doesn't surround its star, you're pretty well stuck with a "polar winter" twice a year, but otherwise can use shadow squares that run on tracks or float free (depending on your rotation period).
The question does not specify the length or periodicity of the day-night cycle. There are a few ways for a very creative writer to get a varying light-dark period on a ringworld.
One is to put a planet between the ring world and the sun. The planet, during its orbit, would eclipse the sun, giving periods of darkness.
The second, is to rotate a small moon around the ringworld. It would have to be a small planet, as we are not talking about a lot of gravity, but doing so would produce a very localized light-dark cycle as the moon eclipsed the sun. It is not beyond conjecture that a sufficiently large ring world would 'capture' some meandering bit of asteroid, in such a way as to cause it to orbit around the ringworld.
The third, and most creative, is to not assume that the sun is a homogenous surface. All of the 'can't do' pooh-poohers start with the basic assumption that the sun emits its radiance equally in all directions. Such scenario-stilting silliness. If one can suspend disbelief enough to posit that a huge ring can be built around the sun, it is not completely beyond the scope of physics and cosmology to continue the conjecture and posit that the local sun has a 'dead half', which does not emit solar radiation. If there is a scientific explanation of localized sun spots, and localized areas were the sun is not homogenous, it is not completely beyond metaphysics to posit that the composition of the sun is not hemispherically homogenous, and that one side (or, perhaps more likely, the poles) do not emit the intense solar radiation that other parts of the sun do. In this manner, as the ring rotates, it would move through an orbit that moves in and out of the solar radiation.
Basically, our history with the study of pulsars and how they operate really comes down to 'According to our theories, a star can not operate this way until we find a star that does, and then we modify the theory'. So within the realm of creative science fiction, such a star is imminently plausible.
This answer seems sufficiently different from my other answer, as to warrant a separate evaluation.
A strict Niven-type Ringworld has the ring rotating around the sun on an orbital plane, aligned with the center of the sun. A relatively static 'plane Jane' typical ho-hum orbital configuration.
Let's switch this up a bit. Offset the plane of orbit of the ringworld from the plane perpendicular to the center of the sun. That is, the ringworld does not orbit the sun around the equator of the sun, but around some other latitude. Since the ringworld is a solid ring around the entire orbit, normal planetary orbital dynamics do not apply. Whereas the effects of gravity on a singular planet in an orbit would pull the planet out of this orbit and towards an orbit around the center of the sun, this could not happen if the 'planet' were the entire orbit. No part could be 'pulled' without the entire 'ring' being pulled. More on this later.
Thus, the radiation of the sun hits the plane of orbit of the ringworld at an angle other than perpendicular. The perpendicular sides of one side of the ringworld would thus cast a shadow across the base of the ringworld.
Now, back to the pull of gravity. As I mentioned, the entire ring would be pulled towards the sun's orbital plane along an axis parallel to a perpendicular through the center of the sun (not just the singular planet being pulled towards the center of the sun as it would in normal orbital mechanics) along a 'virtual cylinder'. This cylinder is perpendicular to an axis through the center of the sun. With a bit of handwaving the energy source (after all, Niven did this with the ringworld maintaining its orbit) provide enough ooomph for the plane of the ringworld orbit to go beyond the sun's orbital plane, until it is 'pulled back' again. This sets up an oscillation of the ringworld plane of orbit, like the head of a piston instead of a pendulum. This oscillation moves the plane of orbit of the ringworld, above and below the sun's planetary orbital plane parallel through the center of the sun. During the 'top half' of this oscillation or 'piston stroke', one side of the ringworld would cast the shadow. But when the oscillating plane 'cylinder head' of the orbit falls to the 'lower half' of the virtual cylinder, the opposite side would cast a shadow. Thus, there is a periodic rhythmic transition on the surface of the ringworld that corresponds to the period of the 'piston' cycle.
There would, of course, be complications in the stress factors and vectors on the ring, and there would be a need to provide the energy (perhaps some electromagnetic pulse that interacts with a magnetic filed of the sun?) that keeps the oscillation going, both factors that Niven handwaved around in his original series. But as an internally consistent method that needs no other outside factor or object, it meets the criteria of the question. The ring itself remains essentially the same, no other outside interventions required, the only thing that changes is the mechanics of the orbit.
For an illustrative TLDR simulation model, think of the rodeo 'cowboy lasso artist' who moves the continuous rope lasso ring above and below the elliptic of his hands, forming a virtual lasso cylinder encasing his body.
This answer only requires that the ringworld is not constrained to an orbit around the equator of the sun, but that it can move 'up' and 'down' along a virtual cylinder with an axis through the sun's center. All other elements if the ringworld remain essentially the same. The shift in light, granted, would be more like a seasonal change than a day-night shift.