Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


January 2001

Win2K Task Scheduler


RSS
Subscribe to Windows IT Pro | See More Task Automation Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    What About the At Command?

A new graphical way to schedule tasks

Windows 2000 includes Task Scheduler, a new graphical tool that you can use to run scripts or programs according to a schedule. The tool helps you create and customize scheduled tasks, then saves the tasks as .job files, which reside in \%systemroot%. You can schedule tasks to run locally, or you can email or copy .job files to remote computers to run scheduled tasks on those computers. Although Task Scheduler doesn't completely replace the At command, which you might be familiar with from Windows NT, Task Scheduler does offer a simpler, more efficient way to schedule tasks. Task Scheduler's advantages over the At command include easier administration, more configuration options (e.g., options to schedule tasks during logon, system startup, or idle time), and the ability to run tasks in different security contexts. (For information about the interaction of Task Scheduler and the At command, see the sidebar "What About the At Command?")

Launching Task Scheduler
Before you run Task Scheduler, be sure the computer's date and time settings are correct. To launch the utility, use the Control Panel Scheduled Tasks applet, or click Start, Programs, Accessories, System Tools, Scheduled Tasks, then double-click the Scheduled Tasks icon. The Scheduled Tasks window opens to display an Add Scheduled Task icon, as well as icons for any existing tasks. You can choose among three methods for creating a new task: Use the Scheduled Task Wizard; manually configure the task; or drag a program, script, or document into the Scheduled Tasks window.

Using the Scheduled Task Wizard
To launch the Scheduled Task Wizard, double-click the Add Scheduled Task icon. Click Next to move past the opening screen. The wizard presents a list of the application files on your computer; this list includes applications that you installed with the OS as well as any third-party software that appears in the Control Panel Add/Remove Programs applet. If the application you want to schedule isn't on the list, click Browse to open the Select Program to Schedule window. You can then select a local application or script, or you can browse through the network to select an object on a remote computer. After you select an object, click Next.

The next screen, which Figure 1 shows, prompts you to name the task and specify when you want it to run. The subsequent screen prompts you to enter a start time and other options specific to the task's frequency. (If you selected the When I log on or When my computer starts option, the wizard skips this screen.)

The next screen prompts you to enter a username and password; the task will run as if started by that user. The final screen offers the usual Finish button but also includes an option to automatically open the created task's Properties dialog box when you click Finish.

Manually Creating a Scheduled Task
After you're familiar with Task Scheduler, manually creating a task is often faster than using the wizard. The manual process also lets you move among settings to fine-tune the task. Instead of stepping through the wizard, you can manually create a task, then leap directly to the task's Properties dialog box to configure the task. This manual procedure also applies to dragging an application or script into the Scheduled Tasks window; the only difference is that dragging the application or script into the window creates the new scheduled task.

To create a task, open the Scheduled Tasks window, then click File, New, Scheduled Task. (You can also right-click a blank spot in the Scheduled Tasks window and choose New, Scheduled Task.) A New Task icon appears. The title is in Edit mode so that you can immediately enter a name for the new task. Right-click the task icon, and click Properties to open the task's Properties dialog box. The Properties dialog box contains four tabs, which offer several options for manually configuring the task.

The Task tab. On the Task tab, which Figure 2 shows, enter the name and path of the application you want to run. If any part of the path contains spaces, enclose the entire path in quotation marks. If the scheduled task is an executable file, you can add parameters you want to run with the program. Next, enter the user under which the task will run. You can also disable the task from this tab; to do so, clear the Enabled (scheduled task runs at specified time) check box.

The Schedule tab. On the Schedule tab, specify the task's frequency. Note that a difference exists between the options on this tab and those in the wizard. When you choose to run a task Daily, the wizard offers a Weekdays option; the Properties dialog box doesn't. If you want to run a manually configured task only on weekdays, you must select Weekly on the Schedule tab, then select individual days. To fine-tune the schedule, click Advanced; the advanced options differ depending on the schedule frequency (e.g., Daily, Weekly) that you choose.

The Settings tab. The Settings tab, which Figure 3 shows, offers options to control task operation under certain system conditions. Under Scheduled Task Completed, you can select the Delete the task if it is not scheduled to run again check box for tasks that have an end date or that run only once. When you select this option, Task Scheduler removes the job after the last automatic occurrence. Don't select this option if you might reincarnate the task. The Stop the task if it runs for option lets you end the task after a specified time (the default is 72 hours). This option is useful for time-consuming middle-of-the-night operations that must finish before the business day begins. Because the default allowance is overly generous for most tasks, you should configure the time to suit the operation's needs rather than accept the default.

Under Idle Time, you can specify options for a task that you configured to execute during idle time (i.e., time during which no mouse or keyboard activity occurs on the target system). Of course, no mouse or keyboard activity doesn't mean a computer is idle; all sorts of activities could be happening, including downloads, database searches, or other automated tasks. Keep this caveat in mind when you schedule tasks: You probably don't want several I/O- or processor-intensive tasks running at the same time unless you're prepared to let them run longer than they typically would individually. The Idle Time options don't necessarily make scheduled tasks run more efficiently.

Under Power Management, you can specify a task's behavior if battery-power problems arise when the task is scheduled to run or is already running. This option applies to laptops rather than computers that switch over to a UPS during electrical power loss. (UPS software such as American Power Conversion's—APC's—PowerChute usually configures all programs, including automated tasks, for shutdown in such an event.) An option to Wake the computer to run this task appears for computers that support that feature.

The Security tab. On the Security tab, which Figure 4 shows, you can specify the users who can view, delete, modify, or use a task. (Table 1, page 102, describes the available permission levels.) Task Scheduler bases task security on standard Win2K security permissions. Remember that the program, script, or document that the task runs might also have security restrictions if the target computer runs NTFS. Be careful not to create a conflict between these security levels.

To configure advanced security options for the task, click Advanced. The Access Control Settings dialog box, which Figure 5 shows, presents options for granular control over permissions, auditing, and ownership.

Working with Scheduled Tasks
After you create and configure a task, you might want to modify it or check its status. Task Scheduler offers several options for working with existing tasks.

Start and stop scheduled tasks. You can run any task at any time rather than wait for the next scheduled occurrence. To start a task, open the Scheduled Tasks window, select the task, and choose File, Run from the menu bar. (You can also right-click the task, then click Run.) To stop a running task, right-click the task, then click End Task. The message might take a moment to reach the task.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Task Automation Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Will Your Next Generation Server System Meet Your Infrastructure Optimization Needs?

Continuous Data Protection and Recovery for Microsoft Exchange

Related Events WinConnections and Microsoft® Exchange Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

Task Automation eBooks Spam Fighting and Email Security for the 21st Century

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Patch Management

Related Task Automation Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement