Each time cast is launched, it moves any eligible Flywheel jobs into the HPC scheduler.
This should be a fairly quick process, and it is likely a good idea to run it fairly frequently.
Depending on your cluster admins, you may want to launch Cast a variety of different ways.
Check with your admin as to the best option for you.
If cron is enabled, this is probably the best choice. The below example would run Cast once a minute.
- Create a new crontab file. Note: you may have to prepend
sudo
if there are any permission issues.
crontab -e
- Select a text editor if prompted.
Select an editor. To change later, run 'select-editor'.
1. /bin/nano <---- easiest
2. /usr/bin/vim.basic
3. /usr/bin/vim.tiny
4. /bin/ed
Choose 1-4 [1]:
- Enter the task for cron to run (at bottom of the file).
*/1 * * * * ~/fw-cast/settings/start-cast.sh
If the script does not run, try using bash
or sh
in the command:
*/1 * * * * bash ~/fw-cast/settings/start-cast.sh
- Save and exit. If you're using nano, save the file with
control + O
, and hit enter
when prompted about the file name and location. Exit withcontrol + X
For further options, check out crontab guru or your system documentation.
If tmux is enabled, this is a very simple way to regularly run cast. Simply launch a named tmux session:
tmux new -s cast
Then, a simple bash loop can take care of the rest:
while true; do ~/fw-cast/settings/start-cast.sh; sleep 60; done
By default, Ctrl+B
then d
exits. See the tmux cheatsheet or your system documentation for more.
If neither option is available, it may be possible to further run Cast on a separate device, and SSH into the cluster when there are jobs available. This would require additional development work to be feasible, and may not work for your cluster, in particular if there are MFA constraints on SSH sessions.
If exploring this option, let us know, we'd be interested to hear about it.