![]() ![]() The previous behavior of SuperDuper masked this operation, because when it launched it killed the agent that had been re-launched: a secondary, unexpected effect. But if it took less than 10 seconds to run, the system (sometimes) starts it again.and since it's in the same minute, it would run the same schedule a second time. Sdbackupbytime is a pretty efficient little program, and takes but a fraction of a second to do what it needs to do. It does this even if a task succeeds, exits normally, and is set up to run, say, every minute. It actually forces a task to relaunch if it doesn't run for at least n seconds. Readers may recall that launchd's ThrottleInterval doesn't really control how often a job might launch, "throttling" it to only once every n seconds. Well, believe it or not, it's because of ThrottleInterval. But it also had a secondary effect: these occasional multiple runs. The known problem with this is that it wouldn't fix Clean My Mac's disabling until the next update. So, in v3.2.4, we check to see if the version is different, and only perform the reload if the agent was updated. In that case, it could potentially kill the process waiting to complete its operation. This worked fine, except when sdbackupbytime was waiting a minute to run another backup, or when sdbackuponmount was processing multiple drives. Previously, in order to work around problems with Clean My Mac (which, for some reason, incorrectly disables our scheduling when a cleanup pass is run, much to my frustration), we changed SuperDuper to reload our LaunchAgents when it starts, in order to self-repair. Well, one thing we did in 3.2.4 was change what SuperDuper does when it starts. We didn't rush out a new update because the side effect was more copies rather than fewer. Of course, anyone who reported any of these problems received an intermediate build that fixed them all. So if that code was right, why the heck were some users getting occasional multiple runs? And why wasn't it happening to us here at Shirt Pocket HQ? (Spoiler alert after many code reviews, hand simulations and debugger step-throughs: NO.) And one of the things I had to change to complete Smart Wake was to loop to stay active when there was a backup coming in the next minute. There was no chance of a logic error: it was only going to run these puppies one time.īut it was, sometimes, regardless. ![]() Which seemed kind of crazy, because, well, our little time-based backup agent- sdbackupbytime-only runs once a minute, and I'd reviewed the code so many times. ![]() In v3.2.4, we started getting occasional reports of scheduled copies running more than once. You'd think, given I've written everything here, I'd learn to pay attention to what I've said in the past. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |