The script auto_haltrun allows you to halt and run SirsiDynix Symphony servers from the command line. The AT Scheduler can be used to run the auto_haltrun script on a regular schedule.
Use of the auto_haltrun script and the AT Scheduler should be restricted to very experienced system administrators who are familiar with the Windows Server operating system.
Halt and Run Script
The following script will halt and/or run all of the SirsiDynix Symphony servers. The output logs will be placed in the error file. The “–debug” option will output extra information to the error file.
auto_haltrun [halt | run] [-debug]
The elements of this script are defined as follows.
• | halt — halts all of the UNICORN servers |
• | run — runs all of the UNICORN servers |
• | –debug — outputs extra debug information |
Auto_haltrun
If the user types auto_haltrun at the command line, this will halt and run all of the SirsiDynix Symphony servers.
Auto_haltrun –debug
If the user types auto_haltrun –debug at the command line, this will halt and run all of the SirsiDynix Symphony servers and will place extra information in the error file.
Auto_haltrun halt
If the user types auto_haltrun halt at the command line, this will halt all of the SirsiDynix Symphony servers.
Auto_haltrun run –debug
If the user types auto_haltrun run –debug at the command line, this will run all of the SirsiDynix Symphony servers, and will place extra information in the error file.
For example, the following report demonstrates the instance of the Task Scheduler Service being set to Manual and having not been started. The command arguments used were as follows.
auto_haltrun -debug
The output generated in the /Unicorn/Logs/Error file is as follows.
UNICORN Socket Server vX.X.X started on Tuesday, January 6, 2009, 5:51 PM
20090106175222 ** Error: Unable to start the Task Scheduler service
20090106175222 Changing the ’Task Scheduler service’ from Manual to Automatic...
20090106175222 Starting the Task Scheduler service...
20090106175222 HALTING all of the UNICORN Servers
UNICORN Socket Server finished on Tuesday, January 6, 2009, 5:52 PM
20090106175229 monitor: stopped
20090106175156 UNICORN Monitor vX.X.X started on Tuesday, January 6, 2009, 5:51 PM
UNICORN Socket Server vX.X.X started on Tuesday, January 6, 2009, 5:52 PM
20090106175222 stopping....UNICORN netstarter
20090106175222 stopping....UNICORN webstarter
20090106175222 stopping....UNICORN Sockserver
20090106175222 stopping....UNICORN Reportcron
20090106175229 stopping....UNICORN Starter
20090106175235 stopping....UNICORN Ipcm
20090106175245 RUNNING all of the UNICORN Servers
20090106175245 starting....UNICORN Ipcm
20090106175246 starting....UNICORN Starter
20090106175246 starting....UNICORN Sockserver
20090106175246 starting....UNICORN Reportcron
20090106175246 starting....UNICORN Webstarter
20090106175246 starting....UNICORN Netstarter
AT Scheduler
The AT command schedules commands and programs to run on a Windows Server at a specified time and date. The Schedule service must be running to use the AT command. Users can schedule the auto_haltrun script to run on a specified timetable.
AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] ”command”
The elements of this script are defined as follows.
• | \\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 – 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 (i.e., next Thursday). If date is omitted, the current day of the month is assumed. |
• | “command” – is the Windows Server command or batch program to be run. |
For example, to schedule the command auto_haltrun halt at 3:00 p.m. today, type the following.
AT 15:00 /NEXT: cmd.exe /c “auto_haltrun halt”
© 2006-2016 Sirsi Corporation. All rights reserved.