Using Microsoft's Schedule Service to launch Jobs in Backup Exec Copyright 1994-1995, Arcada Software, Inc. January 1995 ---------------------------------------------------------------------- If you need to launch Jobs in Backup Exec while no one is logged into Windows NT, you can use Microsoft's Schedule Service. To setup and use Microsoft's Schedule Service with Backup Exec, follow the 3 part procedure below: 1. STARTING THE SCHEDULE SERVICE IN WINDOWS NT 2. SETTING UP BACKUP EXEC TO USE AN INI FILE 3. SCHEDULING THE JOBS USING THE AT COMMAND 1. STARTING THE SCHEDULE SERVICE IN WINDOWS NT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a. Login as Administrator (or equivalent) b. Open Control Panel, and then choose the Services icon. c. In the Services dialog, select the Schedule service. d. In the Services dialog, choose the Startup button. e. In the Schedule Service dialog, select Automatic as the "Startup Type". f. In the Schedule Service dialog, select the correct "Log on As:" account for your situation. See the "Selecting the right 'Log in As:' account" note below for information on the different Accounts. g. In the Schedule Service dialog, choose the OK button. h. In the Services dialog, choose the Start button. The service should start after a brief delay. i. In the Services dialog, choose the Close Button. j. Exit the Control Panel. Selecting the correct "Log in As:" account in Microsoft's Scheduler Backing up data from the local computer only Windows NT v3.1 and v3.5 Select the "Log in as System Account" option if you plan to use Backup Exec to only backup local devices on the same computer as the Schedule service. Backing up data from networked computers and/or from the local computer Windows NT v3.1 Select the "Log in as System Account" option (the "Log in as Specific Account" does not work in Windows NT v3.1). To backup networked connections, you will have to connect to them using the NET USE command before starting Backup Exec. This is easily accomplished using a batch file such as the example below. Keep in mind that if you use this kind of batch file, you need to substitute the batch file name for Backup Exec's executable (bewinnt.exe) in the scheduling examples given later in this document. REM Batch file to backup networked computers net use x: \\Server1\C$ /user:Domain\BackupOper password net use y: \\Server2\C$ /user:Domain\BackupOper password c:\bkupexec\nt\bewinnt /J:\"Backup Network\" /ini:DAT.ini REM Delete networked connections net use x: /d net use y: /d This batch file template assumes that: - A user named "BackupOper" exists who belongs to the Backup Operators group in the Domain. - A job called "Backup Network" exist that selects data on x: and y: - An INI exists which is called DAT.ini Windows NT v3.5 Select the "Log in as This Account:" option. Using this option requires a User account to be entered, preferably a user account that is a member of the Backup Operators group. In addition, the user account must belong to one of the following groups depending on what type of computer the scheduling service is operating on: - If the scheduling service is running on a Server, the user account must belong to the Server Operators group. - If the scheduling service is running on a workstation, then the user account must belong to the Administrators group. Scheduling Service Differences between Windows NT v3.1 and v3.5. - In Windows NT v3.1, when a application is launched using the Scheduling Service, any user that logs into the computer can see or interact with the application. - In Windows NT v3.5, you have a choice as to whether the application can be seen by users. By default, when a application is launched using the Scheduling Service, the application CANNOT be seen, interacted with, nor End Tasked by ANY user - this also means you'll never be prompted to change tapes. This behavior can be changed by either selecting the "Allow Service to Interact with Desktop" switch in the Schedule Service dialog, or using the /interactive switch in the AT command. Both of these changes will allow ANY user to see and interact with the application once it is launched. 2. SETTING UP BACKUP EXEC TO USE AN INI FILE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This procedure is explained in the Backup Exec Manual under the Advanced Operations Chapter. 3. SCHEDULING THE JOBS USING THE AT COMMAND ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Windows NT comes with a command line scheduler called AT (an easier-to- use windows version of AT, called WinAT, comes with the Windows NT Resource Kit). - AT Command Syntax. Invoking AT with the /? switch (i.e., AT /?) will display all of its options (see AT Options below), but not all of the syntax. The following is additional syntax you need to be aware of: a. When entering the time, you must use the 24 hour format (i.e., 6:00pm = 18:00). b. If the job name you are using has a space in it (i.e., Full Backup), you must enter a backslash (\) before the quote (") symbol (not necessary when using WinAT) to keep the quotes around the Job name when it enters the Scheduler's queue. c. You must enter the entire path to the application (i.e., c:\bkupexec\nt\bewinnt). d. When scheduling Jobs with Backup Exec, you MUST reference an INI configuration for the Job. e. The symbols for the days of the week are: M = Monday T = Tuesday W = Wednesday Th = Thursday F = Friday Sa = Saturday S = Sunday Scheduling Jobs --------------- IMPORTANT NOTE: When scheduling jobs in Backup Exec with the AT command, you must strictly follow the syntax outlined in the section above. - For example, to schedule the "Full Backup" job every Friday at 9:00pm using an INI called DAT.ini, type: AT 21:00 /every:F c:\bkupexec\nt\bewinnt /J:\"Full Backup\" /ini:DAT.ini - Additionally, you can use the AT command to administer the schedule service on networked computer. For example, to schedule the "Full Backup" job every Friday at 9:00pm using an INI called DAT.ini on a computer named \\ALF, type: AT \\ALF 21:00 /every:F c:\bkupexec\nt\bewinnt /J:\"Full Backup\" /ini:DAT.ini Viewing Jobs in the Schedule Service's queue -------------------------------------------- - To view the jobs in the Schedule Service's queue, simply type: AT. Deleting Jobs in the Schedule Service's Queue --------------------------------------------- - Each time you enter an item in the scheduler, it gets assigned a ID number. To delete a item from the scheduler's queue, you reference the ID number and use the following syntax: AT ID# /d (i.e., AT 2 /d). If an ID number is not specified, you will be prompted to delete ALL jobs in the queue. Job Examples ------------ These examples assume Backup Exec exist in c:\bkupexec\nt and you are using an INI called DAT.ini. - To schedule the "Full Backup" job every Friday at 9:00pm, type: AT 21:00 /every:F c:\bkupexec\nt\bewinnt /J:\"Full Backup\" /ini:DAT.ini - To schedule the "Differential Backup" job every Weekday at 6:00pm, type: AT 18:00 /every:M,T,W,Th,F c:\bkupexec\nt\bewinnt /J:\"Differential Backup\" /ini:DAT.ini - To schedule the "Full Backup" job, the 1st, 15th, and 30th of each month at 9:00pm, type: AT 21:00 /every:1,15,30 c:\bkupexec\nt\bewinnt /J:\"Full Backup\" /ini:DAT.ini - To schedule the "Full Backup" job only once at 9:00pm tonight, type: AT 21:00 c:\bkupexec\nt\bewinnt /J:\"Full Backup\" /ini:DAT.ini - To schedule the "Incremental Backup" job next Wednesday and Friday at 12:00pm, type: AT 12:00 /next:W,F c:\bkupexec\nt\bewinnt /J:\"Incremental Backup\" /ini:DAT.ini AT Options - This is displayed when AT /? is typed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command. AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]] AT [\\computername] time [/INTERACTIVE] [ /EVERY:date[,...] | /NEXT:date[,...]] "command" \\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted. id Is an identification number assigned to a scheduled command. /delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled. /yes Used with cancel all jobs command when no further confirmation is desired. time Specifies the time when command is to run. /interactive(v3.5) Allows the job to interact with the desktop of the user who is logged on at the time the job runs. /every:date[,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed. /next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed. "command" Is the Windows NT command, or batch program to be run.