filler for includes

Task Schedule Tips

filler for includes

Our final topic - Task Schedule Tips - is about automation.

In the last topic, we looked at some routine maintenance tasks - Disk Cleanup, Disk Defragmenter, and Check Disk.

Now we will look at how you can automate these and other tasks, so that the computer will do them automatically for you, without you ever having to think about it again.

Task Scheduler

Windows has a built-in scheduler, which you can find at;
Start Menu/Programs/ Accessories/System Tools.
When you run it, a Wizard will walk your through the setup process.

The Wizard announces itself with an introductory statement, and invites you to press Next, which you do … and then you wait. After a long, l-o-n-g pause, a new screen pops up inviting you to choose the program you wish to automate. You can automate any program, in the sense of getting it to run at an appointed time. Disk Clean and Disk Defragmenter are popular choices. Choose one.

Let’s say you choose Disk Cleanup. Having chosen, click Next. Now give the scheduled task a name. In the case of Disk Clean, you will presumably be creating two separate scheduled tasks, one for CDrive, and a second one for DataDrive. (Disk Cleanup cannot handle both drives at once.) For now, let’s create one for CDrive, and so we shall call the scheduled task ‘Cleanup_C’.

Next, choose a frequency. With this task, once a day or once a week … it hardly matters. All that matters is whether your computer is switched on when the task is supposed to run! So let’s think about this for a moment.

There are two popular ways of scheduling automated tasks. Choose one.

  • Set maintenance time: you set all of your automated tasks for a set time, and make sure that your computer is switched on at that time. For instance, you allocate Saturday morning for maintenance, and schedule all tasks to run, one after the other, on that day. Thereafter, to do your maintenance, all you have to do is to switch on your computer early on Saturday morning, and make sure that it stays switched on and logged on as needed.

  • Catch as catch can: this time, you schedule your tasks to run at the same time everyday, at a time when you are likely to be using your computer. Then, on any given day, if you happen to be using your computer, the tasks will run, and if not, well, never mind; there is always tomorrow. By scheduling the tasks for every day, or even every 2 or 3 days, the chances are that they will actually run once every week or two.
Each of these methods has its own advantages and disadvantages, and you can choose to use one method of some tasks, and the other method for others. The Scheduled Time method has the problem that you have to keep your eye on the computer at least a little bit during the maintenance time. The alternative method, however, has the problem that the maintenance might happen to run just when you don’t want it to.

Meanwhile, back to our task setup. Having chosen a frequency (daily, weekly, etc.), you press the Next button, and go to the next screen, where you can fine tune the frequency and time of day. Press Next when ready, and enter the username of a User Account with administrator privileges, and its password, if any. (This will only be necessary if you have your usernames password-protected.) Then press Next.

The final screen gives you a summary or your decisions so far, plus a little box which you can tick if you wish to open the ‘advanced properties’ for the task. (Later, you can view and edit these same advanced properties by right-clicking on the completed task, and choosing Properties.) For now, tick this box, and click Finish. The Advanced properties box now opens, in which you can adjust many options for your task.

Batch Files

In addition to, or instead of scheduling tasks at some pre-set time, you can create‘batch files’ to automate complex procedures, and then create shortcuts to make the procedures one-click operations.

So what is a ‘batch file’? It is a script (a very small program) that you write using Notepad. To create a batch file, open Notepad, and Save As, giving it a name with a ‘.bat’ extension. In the file, you type commands that tell Windows what to do.
For our present purposes, let’s suppose we want a batch file that will run Disk Cleanup. So we start with the name of the file that runs Disk Cleanup, which is CleanMgr. How do we know this? Simple: we consult ’Help and Support’.

  1. Go to Start Menu and choose Help and Support.
  2. When the Help and Support Centre opens, find the search box, and type in ‘Disk Cleanup’, then press the Go arrow.
  3. After searching, about 25 options will be found, including some as ‘Full-text Search Matches’, and some in the ’Microsoft Knowledge Base’. To view each group, click on the link at the bottom of the page. For example, to view the entries in the Microsoft Knowledge Base, click on the words ’Microsoft Knowledge Base’. All the available topics will now appear as individual entries. Amongst these will be an article concerning ’automating Disk Cleanup’. If you click on this title, you can learn lots about how to use batch files to automate the cleanup process.

You can also do a search on ‘batch file’, and find a useful article which explains lots about creating and using batch files.
Meanwhile, back to our batch file. Having created it using Notepad, typed in a script (the one word ‘cleanmgr’ - without the inverted commas), and saved it, our next job is to run it, which we can do by either:

  • Double-clicking on it;
  • Right-clicking and choosing ‘Open’; or
  • Opening Run (Start Menu/Run), browsing to the batch file, and pressing OK.

In all cases, the Disk Cleanup program will run.

Fancy Stuff

By themselves, there is not all that much you can do with batch files. Combine them with the Task Scheduler and the ability to create shortcuts, and you can create some really useful magic. For instance, between them all, you can set your computer to automatically run CheckDisk on each of your hard disk drives at an appointed time, shutting down and restarting your computer as needed. In combination with suitable software, you can get it to check automatically your computer clock, run some Internet security programs, delete unwanted files, clean your hard disk, and perform a host of other housekeeping chores, all without you ever having to lift a finger!


Project 1: Create a scheduled task to set your Disk Cleanup to run at a time of your choosing. Then wait until it has run, and check that it has doneits work.

Project 2: Create a batch file to shut down and restart your computer. (Hint: The program that shuts down your computer is ‘shutdown.exe’, and the command to find out about it is ’shutdown /?’.)

Answer to Project 2: shutdown /f /r /t 9

That completes this course on systems administration

filler for includes

filler for includes


SBI Business Building Course
How to Build a Successful Business using the Internet.
A 10 week course on using smart tools to build a profitable internet business. Limited Places,bookings essential.
contact DSCC for more details and booking.


filler for includes