The scheduler doesn't run


To make a small update here in case anyone else is seeing this, so far we’ve found that this was another case of the bug in this post where scheduler events were duplicated when they occur from 11:30PM to 11:55PM.

I’m running some tests tonight to see if I can get scheduler events to fail when they are on that schedule – the user in the linked post didn’t see that so it might not be the root cause here, but it’s a good thing to check.


Hi again @stefanspanberg,

with the help of the information you’ve sent me I believe I’m closer to the cause of this issue. I had it reproducing on one Pi, and am looking to see if you could run a test for me and share your log.

Can you try to create a new scheduler event that tries to turn one of these relays ON? It doesn’t matter which one, and it doesn’t need any recurrence. If my testing is right, it will fail to turn the relay on, but leave an error message in your log at the time of the event creation that might help us get to the bottom of this.

After you’ve created the event, if you could .zip up the log at /var/log/myDevices.log and attach it to an email to, then I can look for this error message, compare it to mind, and share with our developers. Let me know if you need additional steps to accomplish this, and thanks for your help in troubleshooting.


Hi once more @stefanspanberg,

Thanks for the log you sent me. I apologize to make you jump through some more hoops, but after speaking with our developer he’s looking for something a little different that what I’d initially considered. When you have a free moment, could you try this?

  1. Remove all of the scheduled ON events from your account (both the test ones you made for my last log, and the ones which were originally not functioning that prompted your post).

  2. Re-create any ON events as you would actually like them for your project.

  3. Share with me at a newer copy of your /var/log/myDevices.log


  1. Run sudo apt-get sqlite3 to install the SQLite DB tool, then run sqlite3 /etc/myDevices/agent.db to open the Cayenne agent database. This will take you to a SQL prompt. There, enter the command: SELECT * FROM scheduled_settings; and press Enter. This should output a list of the scheduled events for your Pi that we can use to troubleshoot this issue, and compare to the event creation in myDevices.log. You can enter the command .exit to exit the SQL tool.

If you could share the output from #4 along with the new log from #3, I think we’ll have everything we need to get to the bottom of this! Thanks for your help in troubleshooting once again.

-As a final note, you should probably wait until the newly created event time passed once again, to make sure you’re still seeing the ON events fail to fire. I was having some luck reproducing last Thursday when we were talking, but I no longer can on my side after following some of these steps, so it’s possible the event re-creation had some impact on my end results.


Hi there!

Finally I’m back; I’ve been away on some business trips and a lot of customers demanding my time.

Last week I planned to follow your gudelines in your mail during this week since my wife will do some business trips and I will be alone at home with my daughter.

To prepare for the tests I added a new ON event a couple of days ago, in addition to the OFF event I already had. The OFF event has worked all the time.

I’m not sure, but a day or two after I added the ON event it all started to work; I asked my daughter if she had turned the lights on manually in the app but she denied.
And from there I can now confirm that the scheduler does what it should; the lights are turned on and off as I whant them to.

Have you done anything that can explain this? Do you still want me to perform the tasks in the mail?

Best regards,



Since yesterday I even got the sms and email confirming that the ON event has run!

Quite satisfied now!

Best regards,


Thanks for the updates, I don’t think it is necessary to run all of the tests I posted above if things are behaving properly for you now.