run.Job: Runs the job

Description Usage Arguments Details Value Author(s) References See Also

Description

Runs the job.

Usage

1
2
## S3 method for class 'Job'
run(this, reset=FALSE, sink=TRUE, ...)

Arguments

reset

If TRUE, job is first reset, otherwise not.

sink

If TRUE, all output is sinked to a file, otherwise not.

...

Not used.

Details

First the job is locked. Then *setup() is called, and the current working directory is set to the job path, that is, any script or functions calls are evaluated within the job directory. Then the handle method onStart() followed by onRun() are evaluated with this object as the first argument. If an error occurs while evaluating these, it is caught and onError() is evaluated. Similar, if an interrupt, that is Ctrl-C (SIGINT), occurs it is caught and onInterrupt() is evaluated. Finally, handle method onFinally() is (always) evaluated. Errors or interrupts occuring while evaluating this latter method, will not call onInterrupt() and onError(), respectively.

Note also, that if errors or additional interrupts occurs while evaluating onInterrupt() or onError() these will not be caught. This can be an issue if for instance the user holds down Ctrl-C. Unfortunately, there is no solution to the problem at the moment [1].

Value

Returns a TRUE if job finished successfully, otherwise FALSE.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

References

[1] H. Bengtsson, Exception handling in R, 2004. http://www.maths.lth.se/help/R/

See Also

*lock(). *setup(). *isExisting(). *isStarted(). For more information see Job.


R.batch documentation built on May 2, 2019, 4:58 p.m.