If the server returns an error, it will not be parseable JSON, check for that
if the next action is more than <duration> away, exit
If there is nothing to do for more than 15 Minutes, exit
ogdatwatcher

consistent return values
when exiting because of sdidle switch, wait at least for the first heartbeat to occur
fix error in determining the last hittime from the database

The last hittime is, when the last metadata record was checked, NOT when eg. an URL check was performed