The batchfarm uses SLURM to perform a job scheduling. It can only process scripts. Here's an example script how to submit 10 times the script "script.sh" to the farm by running "sendToFarm.sh"




script.sh

#!/bin/bash

#initialize the same conditions as on your environment
. ~/.profile
. ~/.bashrc

# run your program (here, a simple line is piped into a file)
echo "hello again" > ~/output.txt




sendToFarm.sh

#!/bin/bash

nJobs=10 #define the number of jobs
cpu=20 #define the cpu time in minutes
ram=200 #define the reserved ram in mb

counter=0
for counter in `seq 1 $nJobs`;
do
sbatch --mem-per-cpu=${ram} --time=${cpu} --job-name="Job-$counter" script.sh
done