Scheduler¶
The Sympathy Scheduler runs a flow without anyone at the computer: either at a
regular interval, or whenever the contents of a directory change. Each run
executes the flow in batch mode, exactly as
sympathy cli <flow> would.
The scheduler needs an Enterprise Server license, see License Management.
Starting the scheduler¶
Start the scheduler in either of these ways:
In Sympathy, choose . The entry is only shown when the license includes the scheduler.
From a shell, run
sympathy scheduler.
The scheduler runs as a program of its own, so it keeps running after Sympathy is closed. Only one scheduler can run on a computer at a time: starting another leaves the running one alone.
The scheduler shows its window and an icon in the system tray (the menu bar on macOS). It does not start on systems without a system tray.
Choosing what to run¶
- Mode
How runs are started, see Schedule and Watch Directory.
- Syx File
The flow to run. Type its path or browse for it.
Then press Start. The button changes to Stop, and the text above it shows what the scheduler is doing: the time left until the next run, or that a flow is executing. Changes to the settings while the scheduler is running take effect the next time you press Start.
Press Stop to stop starting new runs. A run that has already started is left to finish.
Schedule¶
Runs the flow at once when you press Start, and then again and again.
- Run every
The time to wait between runs, in seconds, minutes or hours.
The wait starts when a run has finished, so runs never overlap. For example, with Run every set to 1 hour, a flow that takes 10 minutes starts 1 hour and 10 minutes after the previous run started.
Watch Directory¶
Runs the flow each time the contents of a directory change, for example when a new data file arrives.
- Datasource Directory
The directory to watch. Only the directory itself is watched, not its subdirectories.
Adding, removing or renaming a file in the directory starts a run. Depending on the operating system, changing the contents of a file can start one too.
The scheduler does not tell the flow which files changed: the flow has to read the directory itself.
Only one run is active at a time. If the directory changes while the flow is running, the scheduler runs the flow once more after the current run has finished, however many changes there were.
Logs¶
Each press of Start creates a new log file, which records the exit code of every run. 0 means the run succeeded, see Return codes for the other codes. Press Open logs to open the directory with the log files.
Closing and quitting¶
Closing the scheduler window only hides it: the scheduler keeps running in the system tray. To show the window again, right-click the tray icon and choose Open.
To quit the scheduler, press Quit in the window, or right-click the tray icon and choose Quit. If the scheduler is running, it asks before quitting. As with Stop, a run that has already started is left to finish.
When it quits, the scheduler remembers the flow, the directory, the mode and the interval, and shows them the next time it starts.
License checks¶
The scheduler checks the license before every run. If the license is no longer active, for example because it has expired, the scheduler stops and shows why. The check needs no network: it uses the license as Sympathy last confirmed it with the licensing server. Sympathy does that at most once a day, when Sympathy or a scheduled run starts.