R.batch: Methods to run batch jobs in R

The package provides methods to batch run R scripts in a straightforward manner. A job batch is defined by a root directory containing subdirectories todo/, running/, finished/, failed/, src/ among others. A job to be processed is a directory placed in todo/. A job is processed by moving it to running/, then sourcing the R files in src/ (containing common code) and then the ones in the job directory (contain job specific code), in which a function onRun() has to be defined, which is then called. Succesfully jobs end up in finished/ whereas failed jobs in failed/.

AuthorHenrik Bengtsson <henrikb@braju.com>
Date of publicationNone
MaintainerHenrik Bengtsson <henrikb@braju.com>
LicenseLGPL (>= 2.1)

View on R-Forge

Man pages

1._Useful_scripts: 1. Useful scripts

as.character.Job: Gets a character string representation of the job

as.character.JobBatch: Gets a character string representation of the job batch

checkRequirements.JobBatch: Checks that requirements are fulfilled or not

clean.JobBatch: Cleans up among jobs in this JobBatch

copyFrom.JobBatch: Copies a job batch directory into this one

createStub.JobBatch: Creates a jobs directory structure stub

equals.Job: Checks if this job equals another

finalize.Job: Finalizes job

findJobs.JobBatch: Searches by name for Job:s in this JobBatch

getDirectory.JobBatch: Gets a subdirectory of the job batch

getInputPath.Job: Gets the input path of the job

getLabel.Job: Gets the label of the job

getName.Job: Gets the name of the job

getNextJob.JobBatch: Gets next non-locked job

getOutputPath.Job: Gets the output path of the job

getPath.Job: Gets the path to the job

getRoot.JobBatch: Gets the root path of the job batch

getRunAndFinishJob.JobBatch: Gets an non-locked job, process it and moves it to a final...

getStatus.Job: Gets the status of the job

getSummary.JobBatch: Gets a summary of the jobs directory

hasFailed.Job: Checks if the job failed

hasStoredImage.Job: Checks if a stored job image exists

isDone.Job: Checks if the job is done

isErroneous.Job: Checks if the job is erroneous

isExisting.Job: Checks if the job exists

isLocked.Job: Checks if a job is locked

isSinked.Job: Checks if job output is sinked to file

isStarted.Job: Checks if the job is started or not

Job: Class representing a batch job

JobBatch: Class representing a batch job

loadStoredImage.Job: Reload a stored job image

lock.Job: Locks the job

main.JobBatch: Static method to be called from the command line

moveJobTo.JobBatch: Moves the job to another directory

Non-documented_objects: Non-documented objects

print.JobBatch: Prints a summary of the jobs directory

R.batch-package: Package R.batch

removeStoredImage.Job: Removes stored job image

resetJobs.JobBatch: Resets Jobs in the job batch

resetLog.Job: Reset log by removing log file

run.Job: Runs the job

run.JobBatch: Process some or all jobs available

saveImage.Job: Save an image of the job

setLabel.Job: Sets the label of the job

setStatus.Job: Sets the status of the job

setupDemo.JobBatch: Static method to setup a demo job batch directory structure

setup.Job: Initiates the job

showWarnings.Job: Displays warning generated while running this job

sink.Job: Sinks job output

sourceHotCode.Job: Sources and removes code in the hot/ and src/hot/ directories

unlock.Job: Unlocks the job

unsink.Job: Unsinks job output

validate.JobBatch: Validates the job batch

wasInterrupted.Job: Checks if the job was interrupted

wasSuccessful.Job: Checks if the job was completed successfully

writeToLog.Job: Writes to log file


1. Useful scripts Man page
addPersistentField Man page
addPersistentField.Job Man page
as.character.Job Man page
as.character.JobBatch Man page
as.character,JobBatch-method Man page
as.character,Job-method Man page
backupLog Man page
backupLog.Job Man page
checkRequirements Man page
checkRequirements.JobBatch Man page
checkRequirements,JobBatch-method Man page
clean Man page
clean.JobBatch Man page
clean,JobBatch-method Man page
copyFrom Man page
copyFrom.JobBatch Man page
copyFrom,JobBatch-method Man page
createStub Man page
createStub.JobBatch Man page
createStub,JobBatch-method Man page
equals.Job Man page
equals,Job-method Man page
finalize.Job Man page
finalize,Job-method Man page
findJobs Man page
findJobs.JobBatch Man page
findJobs,JobBatch-method Man page
getDependencies Man page
getDependencies.Job Man page
getDependenciesRaw Man page
getDependenciesRaw.Job Man page
getDirectory Man page
getDirectory.JobBatch Man page
getDirectory,JobBatch-method Man page
getErroneousPath Man page
getErroneousPath.JobBatch Man page
getErroneousPath,JobBatch-method Man page
getFailedPath Man page
getFailedPath.JobBatch Man page
getFailedPath,JobBatch-method Man page
getField Man page
getField.Job Man page
getFigurePath Man page
getFigurePath.Job Man page
getFinishedPath Man page
getFinishedPath.JobBatch Man page
getFinishedPath,JobBatch-method Man page
getInputPath Man page
getInputPath.Job Man page
getInputPath.JobBatch Man page
getInputPath,JobBatch-method Man page
getInputPath,Job-method Man page
getInterruptedPath Man page
getInterruptedPath.JobBatch Man page
getInterruptedPath,JobBatch-method Man page
getLabel Man page
getLabel.Job Man page
getLabel,Job-method Man page
getLog Man page
getLog.Job Man page
getLogPath Man page
getLogPath.Job Man page
getName.Job Man page
getName,Job-method Man page
getNextJob Man page
getNextJob.JobBatch Man page
getNextJob,JobBatch-method Man page
getOutputPath Man page
getOutputPath.Job Man page
getOutputPath.JobBatch Man page
getOutputPath,JobBatch-method Man page
getOutputPath,Job-method Man page
getPath.Job Man page
getPath,Job-method Man page
getPersistentPath Man page
getPersistentPath.Job Man page
getResultPath Man page
getResultPath.Job Man page
getRoot Man page
getRoot.Job Man page
getRoot.JobBatch Man page
getRoot,JobBatch-method Man page
getRunAndFinishJob Man page
getRunAndFinishJob.JobBatch Man page
getRunAndFinishJob,JobBatch-method Man page
getRunningPath Man page
getRunningPath.JobBatch Man page
getRunningPath,JobBatch-method Man page
getSrcPath Man page
getSrcPath.JobBatch Man page
getSrcPath,JobBatch-method Man page
getStatus Man page
getStatus.Job Man page
getStatus,Job-method Man page
getSubdirectory Man page
getSummary Man page
getSummary.JobBatch Man page
getSummary,JobBatch-method Man page
getTodoPath Man page
getTodoPath.JobBatch Man page
getTodoPath,JobBatch-method Man page
hasFailed Man page
hasFailed.Job Man page
hasFailed,Job-method Man page
hasStoredImage Man page
hasStoredImage.Job Man page
hasStoredImage,Job-method Man page
isDone Man page
isDone.Job Man page
isDone,Job-method Man page
isErroneous Man page
isErroneous.Job Man page
isErroneous,Job-method Man page
isExisting Man page
isExisting.Job Man page
isExisting,Job-method Man page
isFinished Man page
isFinished.Job Man page
isLocked Man page
isLocked.Job Man page
isLocked,Job-method Man page
isNewer Man page
isNewer.Job Man page
isPersistentField Man page
isPersistentField.Job Man page
isSinked Man page
isSinked.Job Man page
isSinked,Job-method Man page
isStarted Man page
isStarted.Job Man page
isStarted,Job-method Man page
Job Man page
Job.as.character Man page
JobBatch Man page
JobBatch.as.character Man page
JobBatch.checkRequirements Man page
JobBatch.clean Man page
JobBatch.copyFrom Man page
JobBatch.createStub Man page
JobBatch.findJobs Man page
JobBatch.getDirectory Man page
JobBatch.getErroneousPath Man page
JobBatch.getFailedPath Man page
JobBatch.getFinishedPath Man page
JobBatch.getInputPath Man page
JobBatch.getInterruptedPath Man page
JobBatch.getNextJob Man page
JobBatch.getOutputPath Man page
JobBatch.getRoot Man page
JobBatch.getRunAndFinishJob Man page
JobBatch.getRunningPath Man page
JobBatch.getSrcPath Man page
JobBatch.getSummary Man page
JobBatch.getTodoPath Man page
JobBatch.main Man page
JobBatch.moveJobTo Man page
JobBatch.print Man page
JobBatch.resetJobs Man page
JobBatch.run Man page
JobBatch.setRoot Man page
JobBatch.setupDemo Man page
JobBatch.validate Man page
Job.equals Man page
Job.finalize Man page
Job.getInputPath Man page
Job.getLabel Man page
Job.getName Man page
Job.getOutputPath Man page
Job.getPath Man page
Job.getStatus Man page
Job.hasFailed Man page
Job.hasStoredImage Man page
Job.isDone Man page
Job.isErroneous Man page
Job.isExisting Man page
Job.isLocked Man page
Job.isSinked Man page
Job.isStarted Man page
Job.loadStoredImage Man page
Job.lock Man page
Job.removeStoredImage Man page
Job.resetLog Man page
Job.run Man page
Job.saveImage Man page
Job.setLabel Man page
Job.setPath Man page
Job.setStatus Man page
Job.setup Man page
Job.showWarnings Man page
Job.sink Man page
Job.sourceHotCode Man page
Job.unlock Man page
Job.unsink Man page
Job.wasInterrupted Man page
Job.wasSuccessful Man page
Job.writeToLog Man page
lastModified Man page
lastModified.Job Man page
listDir Man page
listDir.Job Man page
listFiles Man page
listFiles.Job Man page
loadStoredImage Man page
loadStoredImage.Job Man page
loadStoredImage,Job-method Man page
lock Man page
lock.Job Man page
lock,Job-method Man page
main Man page
main.JobBatch Man page
main,JobBatch-method Man page
moveJobTo Man page
moveJobTo.JobBatch Man page
moveJobTo,JobBatch-method Man page
moveOutputFilesTo Man page
moveOutputFilesTo.Job Man page
Non-documented objects Man page
print.JobBatch Man page
print,JobBatch-method Man page
R.batch Man page
R.batch-package Man page
removeStoredImage Man page
removeStoredImage.Job Man page
removeStoredImage,Job-method Man page
resetJobs Man page
resetJobs.JobBatch Man page
resetJobs,JobBatch-method Man page
resetLog Man page
resetLog.Job Man page
resetLog,Job-method Man page
resetToRun Man page
resetToRun.Job Man page
run Man page
run.Job Man page
run.JobBatch Man page
run,JobBatch-method Man page
run,Job-method Man page
saveImage Man page
saveImage.Job Man page
saveImage,Job-method Man page
setField Man page
setField.Job Man page
setFigurePath Man page
setFigurePath.Job Man page
setLabel Man page
setLabel.Job Man page
setLabel,Job-method Man page
setOutputPath Man page
setOutputPath.Job Man page
setPath Man page
setPath.Job Man page
setPath,Job-method Man page
setRoot Man page
setRoot.JobBatch Man page
setRoot,JobBatch-method Man page
setStatus Man page
setStatus.Job Man page
setStatus,Job-method Man page
setup Man page
setupDemo Man page
setupDemo.JobBatch Man page
setupDemo,JobBatch-method Man page
setup.Job Man page
setup,Job-method Man page
showWarnings Man page
showWarnings.Job Man page
showWarnings,Job-method Man page
sink Man page
sink.default Man page
sink.Job Man page
sink,Job-method Man page
sourceDirectoryWithPreprocessor Man page
sourceDirectoryWithPreprocessor.Job Man page
sourceHotCode Man page
sourceHotCode.Job Man page
sourceHotCode,Job-method Man page
touch Man page
touch.Job Man page
unlock Man page
unlock.Job Man page
unlock,Job-method Man page
unsink Man page
unsink.Job Man page
unsink,Job-method Man page
untouch Man page
untouch.Job Man page
validate Man page
validate.JobBatch Man page
validate,JobBatch-method Man page
wasInterrupted Man page
wasInterrupted.Job Man page
wasInterrupted,Job-method Man page
wasSuccessful Man page
wasSuccessful.Job Man page
wasSuccessful,Job-method Man page
writeToLog Man page
writeToLog.Job Man page
writeToLog,Job-method Man page


R/999.NonDocumentedObjects.R R/006.fixVarArgs.R R/901.UsefulScripts.R R/zzz.R R/JobBatch.R R/000.R R/Job.R R/999.package.R
inst/jobs-stub/src/000.defaultSettings.R inst/jobs-stub/src/onRun.R
inst/jobs-stub/src/000.R inst/jobs-stub/src/onFinally.R
inst/jobs-mandelbrot/src/000.defaultSettings.R inst/jobs-mandelbrot/src/onStart.R inst/jobs-mandelbrot/src/onRun.R inst/jobs-mandelbrot/src/mandelbrot.R inst/jobs-mandelbrot/src/iterImage.R inst/jobs-mandelbrot/src/000.R inst/jobs-mandelbrot/src/onFinally.R inst/jobs-mandelbrot/src/.Requirements.R
man/clean.JobBatch.Rd man/JobBatch.Rd man/unlock.Job.Rd man/getInputPath.Job.Rd man/setStatus.Job.Rd man/wasSuccessful.Job.Rd man/writeToLog.Job.Rd man/loadStoredImage.Job.Rd man/as.character.JobBatch.Rd man/getName.Job.Rd man/1._Useful_scripts.Rd man/validate.JobBatch.Rd man/saveImage.Job.Rd man/equals.Job.Rd man/resetLog.Job.Rd man/resetJobs.JobBatch.Rd man/R.batch-package.Rd man/moveJobTo.JobBatch.Rd man/getStatus.Job.Rd man/print.JobBatch.Rd man/isDone.Job.Rd man/hasStoredImage.Job.Rd man/lock.Job.Rd man/run.JobBatch.Rd man/run.Job.Rd man/isStarted.Job.Rd man/isExisting.Job.Rd man/setLabel.Job.Rd man/checkRequirements.JobBatch.Rd man/showWarnings.Job.Rd man/getRoot.JobBatch.Rd man/main.JobBatch.Rd man/as.character.Job.Rd man/sink.Job.Rd man/isSinked.Job.Rd man/getDirectory.JobBatch.Rd man/isLocked.Job.Rd man/removeStoredImage.Job.Rd man/setup.Job.Rd man/finalize.Job.Rd man/isErroneous.Job.Rd man/getRunAndFinishJob.JobBatch.Rd man/sourceHotCode.Job.Rd man/wasInterrupted.Job.Rd man/createStub.JobBatch.Rd man/setupDemo.JobBatch.Rd man/copyFrom.JobBatch.Rd man/getLabel.Job.Rd man/getNextJob.JobBatch.Rd man/getPath.Job.Rd man/unsink.Job.Rd man/hasFailed.Job.Rd man/Non-documented_objects.Rd man/Job.Rd man/findJobs.JobBatch.Rd man/getOutputPath.Job.Rd man/getSummary.JobBatch.Rd

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.