makeLaunchScript: Generate a script to launch a batch of jobs

View source: R/shell-scripts.R

makeLaunchScriptR Documentation

Generate a script to launch a batch of jobs

Description

The launch script starts jobs as background processes, records process ids in a 'jobs.pid' file, and by default 'waits' for completion of all of the jobs and then shuts down the instance. It also redirects both the stdout and stderr streams into log files.

Usage

makeLaunchScript(
  scripts,
  launchScript = "launch.sh",
  workingPath = "",
  logs = "logs",
  username = "ec2-user",
  prelaunch = "",
  postlaunch = "wait; sudo shutdown now"
)

Arguments

scripts

List with job script file names returned by makeJobScripts.

launchScript

The name of the launch script file to be created.

workingPath

Path to the working directory on remote EC2 instances where scripts should be copied and executed. Default is /home/username/.

logs

Folder where logs recording stdout and stderr streams for each job should be saved. This is created as a subdirectory of workingPath.

username

The username being used on the instance.

prelaunch

Commands to run before the jobs are launched.

postlaunch

Commands to run after all jobs have finished. The default shuts down the instance after all of the jobs have finished running. Set to an empty string to override this behavior.

Value

Named list with job and launch script file names. Passed to launchJobs.


whitwort/AWSTools documentation built on July 9, 2023, 2:56 a.m.