Run Scripts Automatically

It’s sometimes hard to escape feeling like an automaton—an extension of your computer, rather than the other way around. What percentage of the time you spend at your PC is used carrying out repetitive, mundane tasks? Your motor memory has likely enabled you to do things like rename multiple files quickly by hand, or open your database application, email client, and web browser each morning when you sit down at your desk—pretty quickly, and all without thinking about it. But if you do stop and think, your PC, not you, should be handling all this nonsense, leaving you to handle the creative end.

That’s why we have the scripting technologies covered at the beginning of this chapter. But why stop there? Use features built into Windows to run these scripts automatically so you don’t have to. Whether you need to back up important files once a week, generate custom web pages every three seconds, or close errant processes only occasionally, there’s almost certainly a better and faster way to do it than the way you’re doing it now.

Automate Scripts with the Task Scheduler

Windows 7’s Task Scheduler is fairly simple, allowing you to schedule any program or—more importantly in the context of this chapter—any script to run at a specific time or regular intervals.

To open Task Scheduler, open your Start menu, type taskschd.msc /s in the Search box, and press Enter. (Omit the /s parameter to jump to the Task Scheduler Library instead of showing the summary page by default.) ...

Get Windows 7 Annoyances now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.