Remove files from nodes using the job manager

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

Start the job manager and the target managed nodes. If a target node is a stand-alone appserver, also start the administrative agent.

The file to remove must exist on the target managed node.

Use the admin console of the job manager to submit a job that removes a file. From the job manager 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 admin agent or dmgr profile.

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

 

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

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

    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 nodes from the list, or select Node names.

    2. If you selected Node names, then specify a node name and click Add, or click Find and specify the chosen nodes on the Find nodes page.

    3. If user authentication is required, specify the user name and password.

    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.

 

Next steps

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
Starting and stopping the job manager
Starting and stopping the admin agent
Starting and stopping the dmgr
Distributing files from the job manager to nodes

Related reference
Administrative job types using wsadmin scripting
Find nodes
Find node resources

   



Last updated Nov 10, 2010 8:23:07 PM CST