Scheduling Tasks

 

Hyena's remote task scheduling functions can utilize the scheduling systems built into Windows 200x Server, Windows XP, or Windows 7 computers.

 

All Windows scheduling systems utilize the Scheduler service that is installed by default on both Windows servers and workstations. By default, the Scheduler service may not be automatically started on a computer, depending upon the configuration and the version of Windows being used. Before scheduling a remote task, the Scheduler service must be started, otherwise an error will occur when an attempt is made to schedule a task. The Scheduler service can be started by using either the Windows native tools, or by using Hyena's service functions. If a large number of workstations require a scheduled task, use the Service Control functions to configure and start the Scheduler service for multiple computers at the same time.

 

One powerful use of the scheduling function is to schedule task to run privileged tasks under a different user account. Normally, Windows does not allow a user to perform system-sensitive operations, such as making configuration changes, or loading service packs. Instead, an administrator must perform these tasks. Hyena can be used to configure the Scheduler service for multiple computers at the same time, and perform many of these administrative tasks automatically.

 

Windows has two different (and largely incompatible) task scheduling systems, referred to in this documentation as Task Scheduler 1.0 and Task Scheduler 2.0

 

Task Scheduler 1.0 - This scheduling system is included with Windows XP and Windows 2000/2003 Server.  It can be used to execute a program based on time and days of the week, on an interval, and has a few other options.

 

Task Scheduler 2.0 - This scheduling system is included with Windows Vista, Windows 7, and Windows Server 2008.  It is a very complex and fully featured scheduling system.

 

When viewing scheduled tasks, Hyena will automatically detect which system is applicable to the remote computer and display the tasks accordingly.

 

Adding New Tasks

 

To add a new scheduled task, select either the Add New Task (v1.0) or Add New Task (v2.0) menu options from the Scheduled Jobs object for a computer from the left tree window, depending upon what the remote computer will support.

 

Hyena has no easy or fast way to determine the client operating system version when generating a list of computers (for example, through an Active Directory OU query), and therefore has no way of knowing what task scheduler version is supported by a remote computer. Therefore, task creation menu options exist to create both version 1.0 and 2.0 tasks. If a computer does not support version 2.0 tasks, the task creation action will fail with an error.

 

Adding Task Scheduler 1.0 Tasks - When adding a single task to a computer using the Task Scheduler 1.0, Hyena will first prompt for a unique name for the remote task.  Once the initial task is created, Hyena will then display the Windows Task Properties dialog, permitting the task to be customized and scheduled.

 

Adding Task Scheduler 2.0 Tasks - Prior to creating a Task Scheduler 2.0 task, select either the main Scheduled Jobs object on the computer or a task folder.  The new task will be created either in the root of the Scheduled Jobs object or the folder, respectively.  Creating a Task Scheduler 2.0 task in Hyena is nearly identical as using the native Windows task scheduler utility, except as outlined in the 'Task Scheduler 2.0 Differences' section below.

 

Task Scheduler 2.0 Functions

 

Hyena supports a number of functions that are specific to Task Scheduler 2.0, including:

 

Creating new task folders - To create a new task folder, right click on either the main Scheduled Jobs object, or a task folder name in the left window.  Task folders can only be displayed in Hyena's tree (left) window.

 

Navigating the task folder structure - To navigate the task folder structure, start by expanding the Scheduled Jobs under any computer by clicking the plus (+) indicator to display the main task folders.  Microsoft has designed Task Scheduler 2.0 to also allow sub-folders.

 

Execute Task - To execute a task immediately, right click on the task in the right window and select Execute from the menu.

 

Terminate Task - To terminate an executing task, right click on the task in the right window and select Terminate from the menu.

 

Export / Import Task - Task properties can be exported to an .xml file by selecting the Export Task... menu option.  The .xml file can then be modified and/or imported into another computer's scheduled tasks by selecting the Import Task... option on any task folder or the main Scheduled Jobs object.

 

Show Running Tasks - The 'Show Running Tasks' menu option is available on any task folder or the main Scheduled Jobs object. This will show all processes running through the task scheduler including an option to terminate any individual running task.

 

Task Scheduler 2.0 Differences

 

Due to the extreme complexity of Task Scheduler 2.0 interfaces, a number of functional differences and limitations exist between Hyena's and Microsoft's task management tools.

 

Task Priority - Hyena supports setting the task priority; the Microsoft task scheduling management utility does not allow viewing or setting the priority.

 

Custom Task Intervals - Task Scheduler 2.0 tasks have a number of interval-type settings that support an unlimited number of time ranges in days, hours, minutes, and seconds.

These intervals use a Microsoft-developed text-based syntax structure. For example, the interval of "10 Minutes" is expressed as "PT10M".

 

Hyena will attempt to parse any task intervals and if the interval is one of the basic intervals expected, the interval will be selected in the appropriate combo-box in the task properties. However, if the interval is a custom interval, Hyena will display the interval in the native Microsoft interval coding syntax. For example, the interval of "11 Minutes" will be displayed as "PT11M". Microsoft's task management software will usually revert to a total seconds display when a custom interval is encountered.

 

Hyena also supports setting or modifying custom intervals.  For example, Hyena can set an interval of 15 Minutes, instead of only the built-in options of 5, 10, or 30 minutes. Microsoft's task scheduling software does not allow setting or changing custom intervals.

 

Hyena Task Scheduler Limitations

 

Event Triggers - Hyena does not currently support setting or modifying event-type triggers.

Task History - Hyena does not support listing the task history (on the History tab in Task Properties in Microsoft's Task Scheduler).

Network Settings - Hyena does not support the network settings option.

Listing Task Properties - Hyena supports listing more task properties in its right-window task listing. Microsoft's Task Scheduler is limited to only a handful of properties.

 

Copying Tasks

 

Copying tasks is only supported for Task Scheduler 1.0 tasks.

 

When creating a task on multiple computers, Hyena requires that the task be copied (or cloned) from an existing computer.  When the Copy Remote Job (Task) is selected from the More Functions popup menu, use the following procedure to copy a remote task to multiple destination computers.

 

1.  First, select the computers in Hyena's right list window that you want to copy a task TO.

2.  Next, right click and select Add Remote Job (Task)...

3.  On the Copy Scheduled Task(s) dialog, first enter the name of the reference (source) computer that will be used to copy the task FROM, then click the Show Tasks button.

4.  Select one or more tasks from the task list, and optionally complete the Run As and log settings options.  

 

Hyena will then copy the selected task(s) from the source computer to the selected destination computer's task folder.  Note that all of the computers selected must already support Task Scheduler 1.0.

 

Modifying / Viewing Task Properties

 

To view the currently scheduled tasks on a single computer, simply double click on the Scheduled Tasks object for a computer from the left tree window.  To view the scheduled tasks for one or more computers, first display the computers in the list window, and select the desired computers.  Right click, and select Scheduled Jobs.

 

To modify or view a single task's properties, simply double click on any task displayed in Hyena's list window.

 

Deleting Tasks

 

To delete one or more tasks, first display the tasks in Hyena's list window.  Select the task(s) to delete, and use the delete key, Delete toolbar button, or the Delete Task context menu option.

 

Viewing the Scheduler Log File

 

To view the scheduler's log file, select the View Task Log option from the context menu of any server's Scheduled Tasks object.