Get next scheduled execution

Hello, is it possible to know when a specific scheduling will be executed the next time in future?
I didn’t find anything related in the docs, but the UI shows all the schedulings that will occur in the future, so I think there should be a way.


  • Platform information:
    • Hardware: ARM64/4GB/1TB
    • OS: Manjaro 21.2.6 minimal
    • Java Runtime Environment: OpenJdk 11.0.15
    • openHAB version: 3.2.0

Know in what context? To show on MainUI, HABPanel, etc? To use in a Rule?

In general, this information is sort of available through the REST API given that the triggers can be pulled through the API. From there though you’ll need to parse the cron expression or time configuration yourself to determine what the next run would be. That’s what the Shcedule page does.

I’d like to use that information in a widget. Something like: next run at 25/05 08:00.
Can you please point me to the schedule page source code? I will check that out and see if I can get it working.

GitHub - openhab/openhab-webui: Web UIs of openHAB, but you can’t really put arbitrary JavaScript into a MainUI widget so I’m not sure it will give you much help.

I’ll check it out to get an idea about what needs to be done.
Then I’ll probably create a virtual item to store next execution time, and update it through a rule.