Removing files from targets using the job manager

We can submit the Remove file job to delete a file from managed targets. The job can remove a file that previously was distributed to managed targets of the job manager.

Start the job manager and the managed targets. If a target is a stand-alone application server, also start the administrative agent.

The file to remove must exist on the managed target.

Use the administrative console of the job manager or the deployment manager to submit a job that removes a file. From the console, choose the Remove file job, specify the file to remove, specify job options, review the summary, and submit the job. When the job runs, the job manager deletes the file from the downloadedContent directory of the administrative agent or dmgr profile.

Instead of using a console, we can run the removeFile job script in the AdministrativeJobs command group. See the Administrative job types topic.

(iseries) The remove file job can remove files that are accessible from the QShell only.gotcha

(zos) The remove file job can remove files that are accessible from the z/OS UNIX shell only.gotcha

  1. Click Jobs > Submit from the navigation tree of the administrative console.

  2. Choose a job to remove a file from selected targets.

    1. Select the Remove file job type from the list.

    2. Optionally specify a description of the job.

    3. Click Next.

  3. Choose the job targets.

    1. Select a group of targets from the list, or select Target names.

    2. If we selected Target names, then specify a target name and click Add, or click Find and specify the chosen targets on the Find targets page.

      The target can be a host. However, when the target is a host, a wildcard character is not supported for the remove file job.

    3. If user authentication is required, specify a user name, password, or any other authentication values as needed.

    4. Click Next.

  4. Specify job parameters.

    1. For Location, specify the Destination value given when distributing the application file.

      For example, the topic on distributing files using the job manager describes how to distribute the DynaCacheEsi.ear example file. To remove that file, specify the destination value that identifies the DynaCacheEsi.ear file:

        dynacache_esi_sample

    2. For Distribution provider, if you use a distribution provider other than the default distribution provider, specify the name of the distribution provider.

      For the DynaCacheEsi.ear example, do not specify a value and use the default distribution provider.

    3. Click Next.

  5. Schedule the job.

  6. Review the summary, and click Finish to submit the job.


Results

The job manager runs the job and removes the file from the downloadedContent directory of the administrative agent or dmgr profile.

For the DynaCacheEsi.ear example, the file named dynacache_esi_sample is deleted from the downloadedContent directory.


What to do next

On the Job status page, click the ID of the remove file job and view the job status. If the job is not successful, view any error messages that result from running the job, correct the error condition, and submit the job again.

We can delete the file from the /config/temp/JobManager directory of the job manager profile. The file was placed in that directory to enable the distribute file job.


Related tasks

  • Start and stop the job manager
  • Start and stop the administrative agent
  • Start and stop the deployment manager
  • Distributing files from the job manager to targets

  • Administrative job types
  • Find targets
  • Find target resources