[solved] Cron Job doesn't Trigger

my openHab system has been running fine for a long time. But now I wanted to add some features. Doing that I’ve noticed that openHab 3 has been released. Migrating to the current version will be a project for next winter. But for now I hope there’s still support for openHab 2.

I’ve added a rule with a cron trigger. But for some reason it doesn’t trigger. The simplified rule looks like that:

rule "systeminfo_cpu_frequency"
        Time cron "0/15 0 0 ? * * *"
//        Item   nCpuTemperature changed
        logInfo("System Rules","CPU FREQ begin")
        //var cpuFreq = executeCommandLine("/opt/openhab2/conf/scripts/cpuFreq.sh", 1000)
        //logInfo("System Rules","CPU freq is: {}", cpuFreq)
        logInfo("System Rules","CPU FREQ end")

Using the item trigger nCpuTemperature the rule is triggered. But when using Time cron nothing happens. The rule should trigger every 15 seconds. There is no warning or error in the log files.

How can I check if Quartz is active at all? Do I need to install a binding?

Any help is greatly appreciated!

Thanks a lot.

  • Platform information:
    • Hardware: Raspberry Pi 3
    • OS: Buster
    • Java Runtime Environment: Zulu 1.8.0_302
    • openHAB version: 2.5.12

Cron doesn’t support seconds, shortest interval is one minute as far as I now.

Your rule only triggers four times a day:

If you want to trigger each and every 15 seconds, your cron rule should be “0/15 * * ? * * *”


Good morning,

As suggested I was using
because I’m not familiar with the syntax. But apparently I still got it wrong.

Thanks to Chiuaua79 the mystery got solved.

The previous expression in fact triggers only a few times after midnight which I could confirm looking at the log files.
But with 0/15 * * ? * * * the rule is executed every 15 seconds.

Thanks a lot for your support!


I OH3 you can build a cron and it tells you what it will do.

  1. Create a new rule
  2. Under WHEN clicktime event
  3. on a schedule (cron) should be selected
  4. Click on the build red icon.

As you change the settings the text in the heading shows you what the cron is doing.


1 Like