3

The default snakemake jobscript looks like this:

#!/bin/sh
# properties = {properties}
{exec_job}

I have modified it a bit to print some useful information:

#!/bin/sh
# properties = {properties}
hostname=`hostname`
echo "Running on $hostname"
startTime=`date`
echo "Start time: $startTime"
{exec_job}
endTime=`date`
echo "End time: $endTime"

and I pass it through the --jobscript option when executing a workflow.
I'd like to add another piece of information - how many CPUs are used. How can I access this (and other) properties of the job? Maybe it has to do with the cryptic # properties = {properties} line? but how exactly are the properties used?
Would appreciate any hints, as the documentation is pretty vague on this.
Thanks!

soungalo
  • 1,106
  • 2
  • 19
  • 34
  • Maybe, going on the cryptic properties line, this is interpolated just like the shell directive? You could try something like `{threads}` or `{params.myparam}` – Maarten-vd-Sande Aug 18 '20 at 17:39

0 Answers0