5 Managing Jobs

You can view and manage jobs using the JOBS page on the HQueue web interface. At the top of the page is a list of running jobs and on the bottom is a list of the most recently completed jobs. Here is a summary of the columns in each of the job lists:

Column Name Description
(no name) Contains a checkbox for selecting the job row. You can apply actions to the selected jobs using the buttons at the bottom of the list. To select all the jobs, click the checkbox in the header row.
Job Id The job's unique identifier. Click on the id to view the job's details.
Name The name and brief description of the job.
Priority The job's priority. Jobs with higher priorities are scheduled and processed before jobs with lower priorities. 0 is the lowest priority.
Status The job's current status. For a list of all the job statuses, see ( 8.7 Job Statuses )
Progress The job's overall progress as a percentage which also includes the progress of its descendent jobs.
Submission Time The time at which the job was submitted to the farm.
Submitted By Who submitted the job. This is set by the the job submitter.
Start Time The time at which the job was started on the assigned client machine.
Elapsed Time The length of time the job has been running for. Only has a value if the job is still running.
ETA The estimated amount of time left until the job finishes.
Time to Complete How long the job took to finish.
Clients The list of client machines that were assigned to process the job.
Note Threads (no label) The icon specifies whether a note for the job exists or not:
= note thread exist. Hover over to see the latest note. Click to view and edit the full thread.
= no thread. Click to add a thread.

5.1 Job View Pages

A job view page has indepth information about a specific job.

Job Details

This section has information about the job itself. It displays the following properties:

Property Name Description
Name The name given to the job.
Submitted By Who submitted the job. This is only displayed if a job submitter value is specified.
Id The unique identifier for the job.
Parent Job(s) The parent jobs of this job. These are links to their view pages. This is only shown if this job has parents.
Clients The clients that are running or have ran this job. These are links to their view pages. This is only shown if this job has a client running it or had a client run it.
Status The current status of the job. If the job is finished there will be a 'Reschedul' button. Clicking this will reschedule the job.
Overall Progress The percentage of work completed for the job.
ETA The estimated time until the job is completed.
Properties Click on the 'View' link to see a list of all the properties on the job spec in a dialog. See The Properities Dialog for more information on the contents of this dialog.
Status Log Click on the 'View' link to see a Job Status Log dialog. This displays the job status change messages and their timestamps.
On Error The script that is ran when the job fails. This is only shown if the script is specified.
On Success The script that is ran when the job completes succesfully. This is only shown if the script is specified.
Cleanup The script that is ran after the job finishes regardless of whether it was successful or not. This is only shown if the script is specified.
Command The command used to run the jobs. If this is platform independent, then only this entry will appear. If there are platform dependent jobs, then there will be a seperate entry for each platform. In this case, the entries are labelled '[Platform] Command' where [Platform] is the name of the platform that the command is specific to. These entries are only displayed if there are commands specified.
Command Output The captured STDOUT and STDERR of the command. The text box only shows some of this output. The full output can be downloaded by clicking on the 'Download Output' link. This property is only displayed if a command is specified.

The Properties Dialog

See 8.4 Job Properties for details on normal job properties. The table also displays the following additional properties:

Property Name Description
Queue time The time that the job was added to the server queue.
Runnable time The time that the job was set to runnable.
Command start time The time that the command associated with the job was started.
Command end time The time that the command associated with the job finished.
Start time The time the job was started.
End time The time the job finished.
Time to complete How long the job took to run. This is only displayed if the job has finished.
Time in queue How long the job spent waiting in the queue before being ran. This is only be displayed if the job has previously started.
Time to run command How long the command took to run. This is only displayed if the command has fnished.
Requirements The conditions on running the job is under. Each line corresponds to a different condition. This is only displayed if the job has conditions.

Child Jobs

This section holds all of the jobs that are a child of this job. See 5 Managing Jobs for more information on the contents of the tables.

Notes

This section holds information on the note thread associated with the job. See 7 Managing Note Threads for more information on note threads.

5.2 Submitting Jobs

To submit jobs from Houdini, please read 3 How to Submit Jobs .

Submitting Jobs from the Python API

You can also submit jobs via a Python script. Below is an example:

import xmlrpclib

# Connect to the HQueue server.
hq_server = xmlrpclib.ServerProxy("http://hq_server_hostname:5000")

# Define a job which prints "Hello World!".
job_spec = {
         "name": "Print Hello World",
         "shell": "bash",
         "command": "echo 'Hello World!'"
}

# Submit the job to the server.
# newjob() returns a list of job ids (in case multiple jobs are passed in at once).
job_ids = hq_server.newjob(job_spec)

# Query the job's status.
status = hq_server.getstatus(job_ids[0])
print "Status: ", status

For more information on scripting with HQueue, refer to the 12 Python API documentation.

5.3 Rescheduling Jobs

To reschedule a job, go to the JOBS page, check the box for the target job and then click on the 'Reschedule' button located below the job list. You can reschedule several jobs at once by checking multiple boxes in the list.

When a job is rescheduled, it is put back on the scheduling queue where it waits for an available client machine. Rescheduling a job also reschedules its parent jobs and any failed child jobs.

Note that you cannot reschedule jobs that are running.

To reschedule only failed, abandoned or cancelled jobs, click on the 'Reschedule Failed Jobs' button.

5.4 Cancelling Jobs

To cancel a job, go to the JOBS page, check the box for the target job and then click on the 'Cancel' button located below the job list. You can cancel several jobs at once by checking multiple boxes in the list.

When a job is cancelled, it is immediately removed from the scheduling queue and is terminated on the assigned client machine (if any). Cancelling a job also cancels its child jobs.

Note that only running jobs can be cancelled.

5.5 Pausing Jobs

To pause a job, go to the JOBS page, check the box for the target job and then click on the 'Pause' button located below the job list. You can pause several jobs at once by checking multiple boxes in the list.

When a job is paused, its execution on the assigned client machine (if any) is halted. The job remains in the scheduling queue where it waits for the user to either resume or cancel it. Pausing a job also pauses its child jobs.

Note that only unfinished jobs can be paused.

5.6 Resuming Jobs

To resume a job, go to the JOBS page, check the box for the target job and then click on the 'Resume' button located below the job list. You can resume several jobs at once by checking multiple boxes in the list.

When a job is resumed, its execution on the assigned client machine (if any) is reactivated. Resuming a job also resumes its child jobs.

Note that only paused jobs can be resumed.

5.7 Deleting Jobs

To delete a job, go to the JOBS page, check the box for the target job and then click on the 'Delete' button located below the job list. You can delete several jobs at once by checking multiple boxes in the list.

When a job is deleted, it is permanently removed from the database. Deleting a job also deletes its child jobs.

Note that only completed jobs can be deleted.