Starting a sequence from Clarity at a defined time
It is possible to schedule a task that will run Clarity with defined parameters to start a sequence measurement automatically. To achieve this, proceed as follows:
- Prepare a batch script file (e.g., run-sequence.bat) to perform the required tasks via command line parameters
- start C:\...\Bin\Clarity.exe will start Clarity from the specified root directory
- i=2 will open the desired instrument (2)
- u="Administrator" psw="" will log in the specified user using the password provided (necessary even if the password is empty)
- seq=C:\...\SequenceName.seq specifies the sequence to be run
- run_seq=2 starts the sequence on the desired instrument (2)
- Prepare the sequence to be run
- Use the Task Scheduler to schedule starting of the batch script (Windows 11)
- tab General: set the name of the action (e.g., Automatic sequence), choose the Run only when user is logged on option (and do not log yourself off when leaving the PC).
- tab Triggers - New...: set the date and time of running the script, eventually use further advanced settings to fine-tune the task scheduling (e.g., repeating).
- tab Actions - New...: choose the Start a program option a browse to select the prepared batch script.
The batch file should contain the following line (example):
start C:\Clarity\Bin\Clarity.exe i=2 u="Administrator" psw="" seq=C:\Clarity\FC\FC.3.seq run_seq=2
Explanation:
Set the sequence as necessary for your analysis. The sequence can contain just one row with a start-up method, or additional rows with standards/samples for measurement. The start-up method should prepare the devices for measurements, e.g., switch on the detector lamps, flush the systems as required for equilibration, etc.
To schedule running the run-sequence.bat at a specific time and date, use the Windows app Task Scheduler. After creating a new task (Actions section - Create Task... ①), apply the following settings in the Create Task dialog:
The created task is now present in the Task Scheduler Library ②. If Windows Updates are available, remember to install them manually (automatic OS updates might log you out due to PC restart - this would prevent the task to be started by the Task Scheduler).