Schedules (Cron) not working for all devices and applications

I have been experiencing a problem with schedules not working.

This applies to all applications. I believe that I have tried all recommended fixes to resolve this.
I have un-installed all custom applications and performed soft resets many times.

When I look at the scheduled jobs tab on the log page, I see may jobs for applications that were scheduled last January. I know how to clear device schedules by temporarily setting type to Device, however I do not know how to clear schedules for applications.

This was happening last year on my C5 hub and I was thinking the it would be resolved by migrating to a new C7 hub, however the problem has persisted.

At one point I did a factory reset on my C5 (old platform) without reloading backups and schedules started working correctly. I understand this is likely related to some problem with my applications or database. I think the database was corrupted at some point, however a soft reload does not seem to clear the problem.

I have spend many hours clearing jobs that are scheduled to run in the past (by changing Device type to type Device or pressing Done from applications to cause them to unschedule /reschedule) however in each case the job did not run even though the newly scheduled time was in the future. I have also spend many hours searching Hubitat community forms and many weekends trying to resolve the problem. I think my database is corrupted at this point.

I'm nearly ready to resort to a factory reset on the C7 primary hub and starting over with pairing Devices, scenes (room lighting now) and rules, other applications.

Both my C5 and C7 hubs have protect plans and cloud backups.

Please let me know what additional information would be helpful. Any advice or Ideas would be greatly appreciate

Also, since upgrading to 2.3.3.124 attempts to do a soft reset fail
Unknown Error is displayed.

I had previously created a ticket last February and received boilerplate advice about doing a soft reset and other troubleshooting that I had already attempted.

Please let me know what additional information would be helpful. Any advice or Ideas would be greatly appreciated.

This may indeed be database corruption. Historically, the advice would be to do a soft reset, then a restore from a backup. If a soft reset isn't working, you may be running an old version of the Diagnostic Tool. It should eventually update itself, but you can speed the process up (or check your current version) by following these steps: New Diagnostic Tool Version 1.0.97. As of 2.3.3, you also should just be able to restore a backup, as that action alone now performs a soft reset before restoring the backup.

It sounds like you've already tried some of this, but I suppose it can't hurt to try again and see if it happens after both platform and Diagnostic Tool updates.

If none of this helps, perhaps an engineer would be interested in looking at additional information from your hub, but I'd start here first.

2 Likes

That is very odd, I don't remember hearing anything quite like that.

I suspect that whatever "killed" the C5 is now affecting the C7. Tracking it down may be a bit tricky, but maybe you can list the apps (especially community based ones) you are using, and any other custom code you might be running.

Hi, this was my first post the this form. I was not expecting to get a fast response.
I am extremely grateful, I was discouraged after sending a long email to the unmonitored support site.

I did update the Diagnostic Tool to Version 1.0.97 (just now) and did a soft reset.
After the soft reset, I immediately loaded the "Cron TEST APP" by "elfege",
This app uses this cron string to log a message once per minute:

 schedule("0 0/1 * * * ?", master) 

This worked as expected :slight_smile: also works on my C5.
Then I restored db from backup and and cron stoped working.
Then removed most applications, saved a backup, did soft reload/restore and
cron stopped working.

Another symptom that may be related is that I have several 1.2. scenes that I can not save.
I tried to press done from several of the scheduled scenes to cause a re-schedule and the
web-ui just hangs (spins). I will try to delete scenes and soft reload + restore.. however I have
already tried that, actually deleted all applications except Hue Hub (however it was with Diagnostic Tool Version 1.0.75). This got me in trouble with duplicate devices in Alexa when I restored the Amazon Echo Skill (still need to fix that).

Yes I do have the Amazon Echo Skill and Hue Hub.. I am re,oving Groups and Scenes 1.2 now.
I do reboot after deleting applications before I to the backup.. the soft reload and restore.

Thank you for the quick reply... I really appreciate the help.
see my other long winded reply.

I forgot the mention that I also deleted rules 5.1 before the restart+backup+soft reload+restore.

At this point I would be happy to start over with limited applications if I could get cron working with my current devices (some are Hue Hub). Otherwise I may need to resort to a painful factory reset and and deal with re-adding many zigbee and zwave devices.

In the past I have written many custom applications... that may have caused the db corruption, however it was all working fine before a software update sometime around December 2021.

Now I am thinking I will just use Rules 5.1 + new Room Lighting + Echo Skill + Hue Hub.
I have been using the C5 with Hub Mesh to control devices on the C7.

The problem is that I wanted to migrate Scenes 1.2 to Room Lighting and Room lighting will stop working because schedules are broken... It works for a while... then I get an error (I think after 32 schedules fail), I don't remember the details.

Anyway, I would rather have everything working on the C7 for simplicity ... I don't think performance is in issue for me.

Actually I can not remove several child scenes (I did remove references in Echo Skills, the only reference). Also web-ui fails when I attempt to remove Groups and Scenes 1.2 parent app.
When deleting I see the dialog that 47 child devices will be deleted however the delete operation silently fails... maybe I need to manually delete the 47 scene activators?

So lit is likely that this DB corruption and may be the cause of cron failing for devices and other apps.

Is there a way to backup and restore devices only? I understand that the soft-reload does not impact Zigbee or Zwave networks... however the devices require db backup/restore.

Please screenshot and post the exact error you are getting in Room lighting.

I also am going to tag @bobbyD to start a case with with you, this seems sufficiently odd enough that I think support needs to be involved here.

Thank You!
I will try to provide that error... I need to find a backup that has Room lighting installed...
or re-install it. It happened several times where room lighting scenes trigered by a virtual switch would work as expected an then show an error about exceeding a maximum of 32 something (events?) and stop working.

I just now after many restart->backup->soft-reset->restore cycles successfully deleted all 1.2 scenes. Now in the Logs -> Scheduled Jobs tab I only see ~ 23 devices and the few applications that I have install... many schedules are from Jan, Feb, Aug. I am updating the device schedules (by temporarily changing type to Device) pressing Done in applications. I do see the device schedules clear and the schedule time for applications update.

I think my database is in much better shape now, however schedules are still not working.

One symptom that I forgot to mention is that I never receive Sunrise...Sunset hub events.

This was helpful.. with many cycles of restart->backup->softreset->reload I was able to delete Scenes 1.2 that would previously not display for editing or would hang when I attempted t0 remove them. I deleted all applications except Hue Bridge Integration and Echo Skills an now the Logs->Scheduled jobs only has a few items. My hub database seems to be much cleaner (~600k) however schedules are still not working and I still do not get Scheduled Hub events like Sunrise and Sunset.... however I think this is progress (even though I am finding and using light switches again slight_smile:

Anyway I did not know that I should be using the latest diagnostic tooo, so thanks for that advise.
I wish I knew hot to get engineering support for Hubitat, Now that I have Applications deleted Scenes, rules), I'm thinking that I need to stop wasting my time and just do the ZWave exclusion on devices and do a factory reset.

I gave up... I'm starting over with a fresh database.
I did a soft-reset without restoring... then re-discovered Zwave and re-paired Zigbee devices.
Imported previously exported Hue Bridge.
That was painful, however now Cron is working, Devices are working,
Clean slate, I intend to start over with automations and I will be vigilant about backups at every step

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.