Don’t duplicate the work of the Task Scheduler

Posted by

The Windows Task Scheduler is a service which run all the time and allows you to schedule jobs at specific intervals. And it’s really powerful: you can run a task as any user, you can terminate tasks that take too long, you can put ACLs on tasks to allow only certain people to modify them.

So I was totally baffled when I saw Larry complaining about how DnD Online installs a system-tray application to check for updates every four hours.

Now, let’s ignore the fact that it’s checking for updates every four hours anyway (after all, do they really expect to be releasing that many patches?) Just the fact that they’ve got a process running all the time which is exactly duplicating the work that the Task Scheduler service does seems like a total waste of effort to me.

Not only that, but as someone pointed out in the comments to Larry’s post, if the currently logged-on user is a LUA user, it’s unlikely that their custom task scheduler will work at all – how will it overwrite files in the Program Files directory? If they’d used the Task Scheduler like they were supposed to, they could have set the task up to run in the context of an administrator and all would be well. I pointed out in the comments that in Vista, LUA users can patch applications that have been properly set up to allow such patching. But apparently, Least Privilege User Account Patching is a feature of Windows XP as well! You learn something every day.

Anyway, I think the moral of the story is that you shouldn’t try to duplicate effort that’s already been done for you. And especially not in the way that DnD Online has done it – there are much better options available.

blog comments powered by Disqus