Don’t Forget About the Task Scheduler

Filed under Utilities

A little known facet of Windows that’s been there since the early days of NT is the Task Scheduler (I seem to recall actually using the AT scheduler it under NT4, but my memory is sketchy back that far<g>).

image

It’s part of the Control Panel, and it essentially lets you schedule applications, scripts, etc to be run automatically, using a particular set of login credentials, at particular times.

Many applications out there can be run as Services, which means they run all the time, in the background, even before anyone has logged into the system.

But for many types of applications, running as a service isn’t necessary and just takes up memory and processor time from other applications that do need to run all the time.

I happen to use a backup utility called FileBack PC. They have a service module that allows it to run as a service, complete with scheduling etc. But they charge extra for that module.

I was really wanting to schedule my backups to run late at night, and I really wanted them to happen regardless of whether I’d logged into my server or not.

That’s when I remembered the Task Scheduler. Here’s an example screen of a configuration to run a backup job called “NearLine Backups” every morning at 7:00am.

image

In order to setup a scheduled task, you double click on “Add Scheduled Task” and walk through the wizard that follows:

First, the introductions screen:

image

Next, select the application you want to run, in my case, it’ll be FileBack.exe.

image

Choose to run it daily:

image

Set the time:

image

And finally, set the user name and password for the account that this task will be run as:

image

It’s quite important to get the account and password right, since the task that is run will run with those credentials. Also, if the task needs access to certain network resources or drives, that account will have to have access to those resources.

Once you have these bits set, you can always dblclick on the task from the Scheduled Tasks list and edit various details, such as additional command line parameters for the executable being run, etc. In my case, I had to add the name of the backup job I wanted to run, like so:

c:\program files\FileBack PC\FileBack.exe “NearLine Backups”

But every application will be different.

And that’s it.

If you are logged in as the user that the task will run as, and the task is scheduled to run, you’re likely to actually see it start and run.

If no one is logged in, or if you’re logged in as another user, you won’t see anything happening.

As always, you’ll want to test and verify that what you think should be happening actually is. But, using the Task Scheduler is certainly something to keep stashed in the toolkit!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*