The scheduler doesn't run


As far as the last state goes with using relays, I have found that if I’m employing a relay and I need to use invert then on reboot those gpio all go high.


Is your scheduler running?



It seems to work occasionally, but I have forgot to add a notifier.

I changed it now so I will be notified next time.

I am not at home this week so I have to rely on the dashboard in my phone.

Best regards


Hi again,

The problem’s back! The scheduler doesn’t run anymore.

It stopped when I moved my RPi to the place where it should be, and when I started it again the scheduler didn’t begin to work.

It’s possible to control all four relays from the app in my phone, and they change state within a few seconds.

Can you do anything to get it running again?

Best regards,


I will test now my scheduler!


It is working fine!


I’ll see what will happen tonight. I did some changes in my schedule last


The scheduler didn’t work tonight.


Was the schedule to turn off the relay, notify you via email/SMS, or both? If both, did all parts of the scheduled event fail, or only the relay part?



The scheduler worked when the relays turned off the lights tonight, but it
didn’t turn then on.

I won’t be home tomorrow so let’s give it a try once again; I’ll let you
know on sunday evening if it works then.

Best regards,


Thanks @stefanspanberg, we really appreciate you helping to troubleshoot.



Mine schedulers are only for email notifiers setup and they work all. Maybe the problem is not with the platform but with something else…


Hi again,

The situation remains the same; the scheduler won’t switch on my relays, but it switches them off!

Neither notification by email or sms works; no messages received.

Any suggestions to get on with this?

Best regards,


Hi @stefanspanberg, I apologize for the trouble you’re seeing. Since you’re not even seeing the email/SMS notifications, it could be some issue on our end. I’d like to try and replicate this exactly tonight on my end since I ran across an odd but very specific (unrelated to this) scheduler bug today. Maybe it is something in the exact settings of your events?

Could you tell me (really a screenshot would be great), the details to both your on/off events? I’m interested in the exact time, timezones, recurrence, everything. If its too big a pain to block out your email for the forum you can feel free to send it to instead. Thanks again for your help in troubleshooting.


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.