The information below allows you to determine which Item states are persisted, when they are persisted, and where they are stored.
The persistence of an Item’s state may be triggered when that Item changes state or when the Item is updated (even if its state did not change). Persistence may also be triggered by a time-related event (see Cron Persistence Triggers below).
Cron Persistence Triggers
openHAB uses Quartz for time-related cron events. See the Rules article for more information.
Below you will find a complete example persistence configuration file:
// persistence strategies have a name and definition and are referred to in the "Items" section
everyHour : "0 0 * * * ?" // <--------
everyDay : "0 0 0 * * ?" // <--------
// if no strategy is specified for an Item entry below, the default list will be used
default = everyChange
* Each line in this section defines for which Item(s) which strategy(ies) should be applied.
* You can list single items, use "*" for all items or "groupitem*" for all members of a group
* Item (excl. the group Item itself).
// persist the Item state of Heating_Mode and Notifications_Active on every change and restore them from the db at startup
Heating_Mode, Notifications_Active: strategy = everyChange, restoreOnStartup
// additionally, persist all temperature and weather values every hour
Temperature*, Weather* : strategy = everyHour // <---------------------
Everything I would have typed in to answer your question are right there in the documents.
So I could have spent 10 minutes retyping the exact same thing that is in the docs already, or I could point you to the part of the docs that gives you the exact answer to your question and spend that 10 minutes helping someone who has a question that isn’t already pretty fully documented.
I’ve bolded the most important text and added
// <------ to point to the lines in the comprehensive example that specifically answer your exact question.
Just asking a basic question without showing any indication that you have even looked at the docs, done a search of the forum, or even looked at the example in the OP, shows a lack of respect for the time of the volunteers spend on this forum trying to help users, IMHO.
If you DID look at the docs before posting your question, then say so in your original question. Explain what your confusion is and where the docs are not clear. Then we can actually fix the docs to make them more clear.
We don’t have enough volunteers here to spend hours and hours rewriting the docs as a reply every time a user asks a question whose answer is in docs.