I've been trying to get a method to run with a delay after a reboot. I know the subscription works as the scheduler shows the job. The job is shown without a next run time.
I had a problem with this again this morning after my network and systems shutdown overnight.
Could it be that the hub is trying to get ntp for local processing and is unable because the network isn't ready? I'm assuming it's an issue with the myRunIn() method not being able to get the datetime to calculate the delay.
Again, the job is scheduled without next run time being set.
Why don't you just use runIn() instead of your method? It does the same thing. I don't know if that in and of itself would solve your problem. It is true that the hub is wanting to get the time from ntp at startup. I don't know how that affects scheduling, but can look into it.
Set the subscribed method to use runIn(). Unfortunately the same result.
How often does the system try for ntp? I'm wondering whether a loop based on the date variable might be the way to do it.
I could put a delay in the loop so it runs every few mins until it's has a date. Then I don't need to schedule the job, the app will handle the api session normally based on auth result, or is there any other events I could subscribe to, that confirm connectivity. Connection to Hubitat, for example?