render_template: Render a batchtools job script without submitting it

View source: R/render_template.R

render_templateR Documentation

Render a batchtools job script without submitting it

Description

Renders the job script that batchtools would submit to the scheduler for a given batchtools future strategy, without actually submitting (or even creating) a real job. This is useful for inspecting and troubleshooting a template, e.g. to see exactly how resources are expanded into scheduler directives.

Usage

render_template(strategy = NULL, ...)

Arguments

strategy

A batchtools future strategy as accepted by future::plan(), e.g. future.batchtools::batchtools_sge or future::tweak(future.batchtools::batchtools_sge, resources = list(slots = 8)). If NULL (default), the currently set future plan is used.

...

Named resources overriding those already set by strategy, e.g. render_template(future.batchtools::batchtools_slurm, time = "00:05:00").

Value

A character string holding the rendered job script.

Examples

script <- render_template(
  future.batchtools::batchtools_slurm,
  time = "00:05:00", mem = "200M"
)
cat(script)


future.batchtools documentation built on Oct. 19, 2026, 1:07 a.m.