TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


technote:windows_scheduler

Using Windows Scheduler To Execute A Batch File

On Windows, Task Scheduler is a tool that allows you to create and run virtually any task automatically.

Open Windows Scheduler

From the Windows Start bar, search for Task Scheduler and click on the Task Scheduler App to open.

Create A New Task

From the right panel on the Task Scheduler App, click Create Task to open the Create Task window.

General Tab

On the General tab add:

  • Name for task that clearly identifies it for you and other operators.
  • Description of task to explain what it does.
  • Check RRun whether user is logged on or not.
  • Check Run with highest privileges.
  • Ensure the Configure for drop box is set to the appropriate operating system.

Triggers

On the Triggers tab, click New to create a new trigger for the scheduled script.

On the New Trigger popup window:

  • Set the Begin the task to On a schedule
  • Under Settings, select the schedule you want the task to run on.
  • Under Advanced settings, select the option to repeat the task and how often it is required. ie repeat every hour indefinately for a task you want to run every hour of every day.
  • Ensure Enabled is checked.
  • Click OK to add the trigger to the scheduled task.

Actions Tab

On the Actions tab, click New to create a new action for the scheduled script.

On the New Action popup window:

  • Ensure the Action drop down box is set to Start A Program.
  • Click Browse and navigate to select the required batch file.
  • If your batch file uses relative file paths, add the starting directory in the Start In field.
  • Click OK to add the action to the scheduled task.

Conditions Tab

The Conditions tab allows you to set execution restrictions, such as wait for the computer to be idle for a set time before running the script or only if the computer is on AC power.

As TapeTrack scripts are normally essential processes to keep your database up to date, these restrictions are normally not advisable.

Settings Tab

The settings tab has several options such as:

  • Allow the task to be run on demand (check).
  • Run task as soon as possible after a scheduled start is missed (check).
  • If task fails, restart every (uncheck).
  • Stop the task if it runs longer than 3 days (check).
  • If the task does not end when requested, force it to stop (check).
  • If the task is not scheduled to run again, delete it after (uncheck).
  • If the task is already running, then the following rule applies (Do not start new instance)

Click OK to create task, if prompted enter the password to complete the setup of the scheduling.

technote/windows_scheduler.txt · Last modified: 2020/04/10 01:40 by scunliffe