Lock File Management, enabled by default, creates a lock file on the file system, which persists for the duration of a Job’s execution.
The purpose of the lock file is to prevent new instances of your Job starting execution whilst another instance is either still running or in an error state.
Lock files are always deleted on the completion of a successful execution and, optionally, deleted if the Job fails in a known error-state (a handled error). In this context, a handled error is one where a Job is able to auto-recover from a previously unsuccessful execution.
To disable Lock File Management, set the following parameter: –
If you want to prevent lock files from being deleted in a handled error, set the following parameter: –
Lock files are located in the directory identified by lockDir. The following is an example of a lock file name: –
The default error exit code of a Talend Job is 4. A Handled Error is considered to be any error that occurs prior to execution of a user-defined task, a Job that is derived from Job: TemplateChild, or where Job: TemplateChild exists with an exit code of between 1 and 3.
When you handle errors within your own Jobs, it is recommended that you exit with exit code 3, if you would like the lock file to be removed, permitting the Job to restart, without manual intervention.