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:

  1. Prepare a batch script file (e.g., run-sequence.bat) to perform the required tasks via command line parameters
  2. 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:

    • 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)
  3. Prepare the sequence to be run
  4. 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.

  5. Use the Task Scheduler to schedule starting of the batch script (Windows 11)
  6. 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:

    • 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 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).