I have a driver that needs to reauthenticate with a service every 60 days, and the schedule isn't being set up properly. I wrote a quick driver to test this out (give it the capability "initialize" so you get a button):
The issue is that not all values of "x" work properly. I verified that it works properly through 15 days (x=1296000) and that it doesn't work at 60 days (x=5184000). I wasn't able to figure out exactly at what point it breaks. Platform version 2.3.4.133.
I tested by clicking initialize, then refresh the device page and look at when the schedule is supposed to run.
as a workaround just have it run every 15 days for now and keep a state variable ctr and when it hits the 4th run do your stuff and reset it.. I know a pain
Or just set a state variable to a timestamp of when it last ran (lets call it lastAuth). Run a function every day (or 2 or whatever) and check against the timestamp, if its not time yet schedule the next run and bail out. Once you are past the mark, run the re-auth stuff as needed and update the lastAuth state variable to a new timestamp.