Startup and Shutdown

Startup Script

The scheduler engine can run a startup script before twilight if ACP indicates that the weather is safe, or each time the weather becomes safe after being unsafe. If it finds a script named StartupObs.vbs or StartupObs.js in the Scheduler configuration files folder, it will be run each evening at a configurable time (Open Time) before local sunset (Sun altitude 0 deg). The default is 60 minutes. Evening Flats or Dusk Flats (if requested) will be run immediately thereafter (dusk/sky flats waits for the right conditions before taking flats). NOTE: If you enter a negative value for the Open Time, it will be turned into a positive and used as the time relative to the configured astronomical twilight instead of local sunset. This can be useful in Summer at high latitudes.

TipAll of the special scripts must be located in Public Documents\ACP Config\Scheduler (as of ACP Expert 8), in keeping with the Windows security model for Windows 7 and later. If any special script is found in the old Program Files\ACP Scheduler location, it will be automatically moved to the new location.

You can use the startup script to turn on equipment, open the dome or roof, and otherwise get ready to start observing. The details of such a script are highly observatory-specific. DC-3 Dreams offers consulting services to assist in developing startup scripts. I suggest you contact me by phone at +1 480 396 9700 for additional info.

If the weather becomes unsafe during a run, it is assumed that ACP will park and close the observatory, leaving it in a "ready" condition to be re-opened. If the weather again becomes safe later in the same night, the startup script will be run again, allowing observing to resume.

If you stop the dispatcher, the next time you re-start it, the startup script will be run again.

TipThe startup script must be able to re-start as well as cold-start the observatory. If ACP has safed the observatory for unsafe weather, the startup script must still run successfully, restoring it to a ready condition. The best way to assure this is to make the startup script able to run even if the observatory is in a completely ready condition without failing.

Sample StartupObs.js

To help you get going, a sample script SampleStartupObs.js file is included with Scheduler. To use it, rename it StartupObs.js. It may be sufficient for your needs, but it does not contain any code for turning on the power to your devices. It will start up MaxIm and FocusMax, and connect ACP to these programs. This script should not open the dome! See below.

Open the script in Notepad and look around. If your MaxIm is V5, you'll have to change the path to it. If you have a rotator, you'll have to uncomment the code for that. Perhaps you're getting the idea why I said that this is observatory-specific. But if you have some Javascript skills this might help.

Note that this script logs its progress into your ACP logs folder, in the Scheduler subfolder, as StartupObsObs-yyyymmdd@hhmmss. Look at this with notepad to see any problems you suspect. Also be sure to test it by running it in ACP directly, then test it using the scheduler's Utility menu, Test Startup before leaving it to the Scheduler to run.

TipThe startup script must not open the dome! The scheduler needs to be able to start the observatory for dawn cal frames, and it may do so when the weather is unsafe. In any case, there's no need to have the dome open during cal frame acquisition. The scheduler will open the dome if it needs to do live observing.

Shutdown Script

The scheduler engine can run a shutdown script at the end of each night's run. If it finds a script named ShutdownObs.vbs or ShutdownObs.js in the Scheduler configuration files folder, it will be run each morning after observing stops (when astronomical night ends). Dawn Flats and Dawn Cal Frames (if requested) will be run immediately before the shutdown script.

TipAll of the special scripts must be located in Public Documents\ACP Config\Scheduler (as of ACP Expert 8), in keeping with the Windows security model for Windows 7 and later. If any special script is found in the old Program Files\ACP Scheduler location, it will be automatically moved to the new location.

You can use the shutdown script to park your scope, close the dome or roof, and otherwise get the observatory into condition for the day. You can shut down software and equipment power. The details of such a script are highly observatory-specific. DC-3 Dreams offers consulting services to assist in developing startup scripts.

TipThe shutdown script will be run even if the weather is unsafe at dawn. ACP will have "safed" the observatory when the weather became unsafe, and the shutdown script must handle that state as well as a fully ready observatory. See Weather Handling.

Sample ShutdownObs.js

Included with Scheduler is a sample ShutdownObs.js script. It may be sufficient for your needs, but you should look at it in Notepad. It will park the telescope, warm the cooler in the camera, disconnect the camera and telescope from ACP, then shut down MaxIm DL and FocusMax. It has commented-out sample code to control power to your equipment.

NOTE: If you have a dome or roof, your ACP can be set to "Automatically park/home the dome AFTER parking scope". With this enabled, the telescope parking code in the script will also have the dome close. It is harmless if a previous Dawn Cal Frame run closed the dome/roof.

Note that this script logs its progress into your ACP logs folder, in the Scheduler subfolder, as ShutdownObs-yyyymmdd@hhmmss. Look at this with notepad to see any problems you suspect. Also be sure to test it by running it in ACP directly, then test it using the scheduler's Utility menu, Test Shutdown before leaving it to the Scheduler to run.