It does nothing on its own — except saying that you need to implement the poll() command (just like how any other capability usually has specific commands or attributes it requires). Like other commands, this would generally be used by apps, often ones that specifically select for devices with this capability so that they know the command exists.
The "Poll these devices" action in Rule Machine is one of the few places I can think of where this command is used in a built-in app. (This will call the command once, unless your rule does a repeat or something else to create different behavior.) In many drivers, it's effectively the same as refresh(), which is a much more commonly implemented command. I suppose this capability might exist to let apps know that certain devices might require this on a regular basis for status updates — but, again, it doesn't do anything on its own.
A Driver is a way to abstract overlapping features into a common set of mechanisms. Poll is an optional capability, just like switchLevel or motionSensor.. adding it to a driver means you intend to add code to be run when a Poll command is sent...
Sent by what and that's the thing I think you're missing. Generally you have an App that allows for devices to be selected that have a common Capability. Then all the selected devices from the larger list can have commands sent to them.
Again, the Poll capability is optional. By convention, ZWave + drivers don't have Poll, which prevents them from being selected inside the ZWave Poller App.
Can drivers repeat? Sure. Drivers for many of the cloud based services will poll on a schedule. Weather and WiFi Thermostats come quickly to mind as examples.
How the device is used drives the decision to put repeats into a Driver or an App.
now got it scheduling. need to test this evening but the logs show scheduled jobs
in case anyone else struggling this is code that basically sets a schedule based on a preference.
if the preference is on at 1 am it created a scheduled job for sunrise and sunset which then runs some commands.