This is a how to change rts2 variables for the telescope or other instruments, the way you would from the rts2-mon interface, but from outside of it.
The motivation from this is to benefit from the versatility of other UNIX utilities to run scripts.
Using rts2-xmlrpcclient
You must first have a config file (default is /home/user/.rts2 that contains the user and password for the running xmlrpcclient interface under [xmlrpc]
[xmlrpc] authorization = "user:password"
Then you must simply run “rts2-xmlrpcclient -s” and the variable and the value to be set.
For example to set a specific target to be observed next:
rts2-xmlrpcclient -s EXEC.next 3
Now if you want to set a specific variable each hour, day or week the man page for the command cron should be looked at.
For running a command only once at a certain time, the “at” command is useful:
echo "rts2-xmlrpcclient -s SEL.selector_enabled false" | at 2359
See the man page of at for other ways to specify time. Remember this is by default in local telescope time.
Another important feature is to send commands, which is not the same as setting variables. For example if you want the executor to stop the current observation and observe a specific target immediately:
rts2-xmlrpcclient -c EXEC.now 3
This is also good for parking or moving the telescope or asking the dome to “reset_next”.