Gizmo's Freeware is Recruiting
We are currently looking for people with skills and/or interest in the following areas:
- Digital photography software
- Windows defragmentation software
If this sounds like you then click here for more details
How to Schedule Programs to Run Automatically
It's often very handy to be able to schedule tasks to run unattended. The classic example is backup. I backup my key data each night at 2.00 a.m. and thankfully I don't have to be there to make it happen. Instead it takes place automatically using the task scheduler built into the backup program.
However, not all programs have an inbuilt task scheduler. In these cases it's still possible to run the program using a scheduling program. In this article we will look at two: Task Scheduler that comes free with all Windows versions from Windows 98 onwards and a rather more sophisticated freeware product called System Scheduler.
Windows Task Scheduler
Windows inbuilt scheduler is perfect for scheduling programs that don't require any keyboard inputs to run.
Let's explore the use of Windows Task Scheduler by setting up an automated daily task to clean all the junk files off your hard drive. I'll use Windows XP in this example but the technique I'll describe works for Vista and Windows 7 as well though the interface for Windows Task Scheduler is a little different in each case.
The program we will use to do the cleaning is the excellent free utility CCleaner. If you don't have a copy, go grab it now from here: http://www.filehippo.com/download_ccleaner/
After downloading, install the program on your PC. During the installation make sure you un-check the option to install the Yahoo Toolbar, unless, that is, you really want it. After installing CCleaner start the program and check the default cleaning options to make sure these are what you want. For example, if you want to retain your browser history and auto-complete make sure those boxes are unchecked. Once you are happy with the options, shut down CCleaner.
Now start up the Windows Scheduler by clicking Start / Control Panel / Scheduled Tasks / Add Scheduled Task. Click on Add a Task and this will start the Scheduled Task Wizard. Click <Next> and this will bring up a list of programs. Select CCleaner then <Next>.

Then select Daily and <Next>. Then whatever time you want the program to automatically run and <Next>. After that, enter your username and passwords followed by <Next>. Don't click <Finish> just yet.
Now we need to use a little trick. If you stop at this point CCleaner will run automatically at the prescribed time but won't actually do any cleaning. It will be just sitting there waiting for you to press some buttons.
To get around this you need to tell CCleaner to run without any user intervention. Thankfully the folks at CCleaner have provided a special command line option to do this.
To add the command line option, check the "Open advanced properties" box in the Task Scheduler Wizard and then <Finish>. In the "Run" box you should have something that looks like this:
"C:\Program Files\CCleaner\ccleaner.exe"
Now click at the end of this line just after the .exe, leave a space and then type in /AUTO so the complete line now looks like this:
"C:\Program Files\CCleaner\ccleaner.exe" /AUTO
The /AUTO tells CCleaner to run automatically once started and exit automatically when finished which is exactly what you want.

Well that's it! You've now created a scheduled job that will clean your hard drive of unwanted files every night.
If you want to create other scheduled jobs such as backup or defragging your hard drive you can do so in the same way.
Unfortunately, not all programs have command line options like CCleaner that allow automatic running without user input. For these programs to run automatically you need a program that can automate the entry of keystrokes.
System Scheduler
For more complex task scheduling my top choice is System Scheduler. It does a similar job to Windows Scheduler but additionally it allows you to enter any key-presses required by a program in order to run. You can do this by entering into System Scheduler a line containing the keystrokes you want to execute when the program runs.
Lets look at a practical example using DiskKeeper Lite. When you run this program you need to click a few buttons in order to start a defrag job. Usually you would use your mouse to do this clicking but you can also use keystrokes to achieve the same thing ike this:
- Close the nag screen. This can be done from the keyboard in DiskKeeper by pressing Alt F4
- Select the menu item "Actions." This can be done from the keyboard by pressing Alt A
- Select from the Actions menu the item "Defragment." This can be done from the keyboard by pressing the "D" key
In System Scheduler you would do this by entering the string "%{F4}%{A}D" into the "Sendkeys" field within the System Scheduler job setup panel. Note that in System Scheduler plain keystrokes such as "D" are entered as you would normally type them but special keystrokes such as Alt F4 have to be entered using a code like %{F4}. Full details of these special key codes can be found in the System Scheduler help file.

The developer offers a free and a Pro version of System Scheduler. The latter has some useful additional features such as the ability to reboot and run as a service but the free will do for most folks. Furthermore, the free version covers both home and business use.
Gizmo
- Article type:
Comments
Great article, keep up the good work.
Nice one, this will definetly help me.
Best to leave a computer running because electronic items tend to blow out at startup. When an electric item is turned on, there is an initial surge of heat which goes through the parts.
This is easiest to see with light bulbs, it's the same reason why light bulbs normally go out when a bulb is cold and the switch is flipped on rather than just burning out while running.
ok hier is my question.great post
i was wondering i run program autounpacked in task scheduler in vista but i dont know how to start it.someone told me comand line /run
but i dont know where to put it.please help
cant do it. It tells me i dont have permission to run the operation. I dont have any password to login.
I was not aware of this, does Ccleaner run minimized ?
Thanks, it works excellent in Vista too.
In Vista, you can access the Task Scheduler from Control Panel / Administrative Tools / Task Scheduler. Or it is usually located under Accessories / System Tools in the start menu.
Then select Create Task. First you create a trigger/scheduler for the task. The trigger gives you many different options, such as to run it daily at any time you want. Secondly create an action for the specific program you want to run (you add the command line /AUTO argument in this step). It is very similar to Gizmo's directions.
There is also an option to trigger the Ccleaner periodically once it begins running. For example, you could follow these steps:
(1) Go to Task Scheduler / Create Task.
(2) On the General tab: select "Run whether user is logged on..." and check "do not store password." Also check "Run with highest privileges".
(3) On the Triggers tab: Begin the task "at startup", Delay Task for 30 seconds (to prevent it failing at startup, at least for me), Repeat task every hour (or so) and for a given period of time or indefinitely, Check Activate, Check Enabled. Click "ok"
(4) Set Action as usual.
If you run CleanMem, then just mimic the settings for it. I analyzed before and after running it and it successfully cleaned even though it did not display an icon while it was cleaning.
Try checking the box "run only if logged in"
Programs include Glary Utilities, WinPatrol, CleanMem, several Defrag utilities, Secunia PSI, Vista Services Optimizer, TweakUAC, and Ultimate Windows Tweaker. Once a week I also have my PC Automatically fix file system errors, and delay some startup programs. In addition I've implemented several tips I've found in books about Vista.
Shouldn't this:
"C:\Program Files\CCleaner\ccleaner.exe /AUTO"
be:
"C:\Program Files\CCleaner\ccleaner.exe" /AUTO
On my state-of-the-art win98 machine it is, otherwise it gets changed to:
"C:\Program Files\CCleaner\ccleaner.exe \AUTO". You can try it by executing the task. If you see an icon appearing in your taskbar for a few seconds, all is well.
Thanks for pointing this out.
"C:\Program Files\CCleaner\ccleaner.exe" /AUTO
is the correct one.
Now updated in the review.
Avast blocks download page for system starter finds trojan
sorry system scheduler is blocked by avast
I've been wanting to know how you schedule programs that require input. I just tried System Scheduler to run a complex batch job and it works great. Thanks for that one Giz. Ken.
What other programs would you recommend running on windows xp, automatically?
Backup and maintenance tend to be the most common applications but some folks have particular needs such as batch email send, reminders etc.
My problem is that I can't depend on XP Pro SP3 to wake up if it's in Standby mode. This is not exclusive to running Scheduler (although that's how I try to use it), it's a basic Windows problem. Have you looked into this?
You should check out Autoit, a freeware auto run programme which allows recording of commands and mouse clicks, allows most window manipulation commands, and creates editable scripts.
How well explained is that! The Gizmo Richards hallmark style.
One query:
- I've always believed it's better, as a general rule, to shut ones computer down at night so that the motherboard etc. can get some shut eye and discharge the static electricity accumulated at work. But perhaps I'm wrong. And maybe one could just schedule ones computer to shut down anyway once it's finished its night shift?
This is a moot point Bob. Some techies advise turning your PCs off, others advise leaving them running. Personally I leave my PCs running all the time and must say I have had very few hardware problems over the years.
That's a fair comment but AutoIt is a full scripting language and overkill for most simple scheduling tasks. Great product though.
hmmm... that's interesting - thanks.
My 2¢: You shuld turn off your PC if you won't be using it for a substantial amount of time. This is for two reasons: Energy savings and Security. The energy savings (although small) will add up over time and there is no more secure PC than one that is not on.
yes, I've just been wondering whether anyone happens to know of any indicative, scientifically conducted statistical studies on the subject?
(But I wouldn't want to get off topic... let's stick to the schedule!)
In the days of huge mainframes, it was quite a chore to get the beasts up and running. Most were kept running to save that time. PCs are well protected from turn-on surges so keeping them running is not a good thing as overheated parts can cause a fire if not caught in time. I wouldn't want to be away from home with my computer self-distructing.
The cnet editor gave it a 5star rating, as I would, though the 2 customer reviewers didn't quite seem to know how to use it. I know that it took me several tries to get it configured correctly.
and the official website link:
http://www.airytec.com/en/default.aspx
Moderator's Comment: Download link removed. Please do not link directly to downloads. :)
CClean only cleans files for the currently logged in user, right?. So, runas 'gizmo' will only clear temp files for 'gizmo' in this example? I want to clear temp files for all users.
I have always had both my (Vista) computers restart every morning with a freebie called Switch Off. It has done a great job even though it was last updated in 2002 (version 2.3.0.1). In the CCleaner settings I have "Run CCleaner when the computer starts" checked. Then CCleaner does its cleaning everyday, automatically.
By the way, both my computers run as if they were brand new out of the box. Of course, I use other programs also to keep them that way.
PS I just noticed at Download.com that Switch Off was updated on 1-15-2010 (version 3.1.0.380).
I forgot to mention:
To get Switch Off to run correctly I had to do several things: 1. Check "Run whether users are logged on or not." 2. Check "Run each time windows starts." 3. Make sure that in a separate startup program that Switch Off is enabled. 4. In one of those startup programs, set Switch Off to have a delayed start, otherwise it would not start automatically each day. Once I got these settings figured out, the program works great. For me, Switch Off is a must have program!
This is from my comments I left at download.com
Frank
PS I used the feature in Glary Utilities for #3 and #4 but I guess you could use programs such as Startup Delayer or WinPatrol
Lastly, run Switch Off as administrator if need be. This is only needed in the newer versions as the early 2.3 version runs just fine without administrator privileges and without the delayed startup. That early version is still available at the author's website.
Post new comment