Skip to end of metadata
Go to start of metadata

What is the best way to check the status of individual jobs?

We suggest to use the following to call to check the status:

./ status | grep job_name | grep state | awk '\{print $5\}'| awk -F"=" '\{print $2\}'

This prints the output as continuous data, so it's difficult to check for the status of a particular job.

The output currently looks like:

<?xml version="1.0" encoding="ISO-8859-1"?><spooler><answer time="2013-07-12
12:23:59.402"><state time="2013-07-12 12:23:59" id="scheduler_1"
spooler_id="scheduler_1" spooler_running_since="2013-07-10 12:52:01"
version="1.3.3124-b118f08157a1f8b18c836653c148c3bde5460575" pid="6596"
host="Test-mViewReport" need_db="yes" tcp_port="4460" udp_port="4460" db="jdbc
-id=spooler -class=org.postgresql.Driver
jdbc:postgresql://localhost:5432/scheduler_db -user=scheduler_user"
loop="13956582" waits="3603113" wait_until="2013-07-12
12:24:00.000"><jobs><job path="/AMR_SMS_FDA_DB_LOADER"
name="AMR_SMS_FDA_DB_LOADER" job="AMR_SMS_FDA_DB_LOADER" state="pending"
title="AMR_SMS_FDA_DB_LOADER" all_steps="1901" all_tasks="1901"
order="no" tasks="1" next_start_time="2013-07-12 12:24:00.000" in_period="yes"
enabled="yes"><file_based state="active"

We suggest you try:

./ status | sed -e 's;><;>\n<;g' | grep job_name | grep state | awk '\{print $5\}'| awk -F"=" '\{print $2\}'

or, to reduce the size of your answer, use:

./ command "<show_job job='job_name'/>" | sed -e 's;><;>\n<;g' | grep job_name | grep state | awk '\{print $5\}'| awk -F"=" '\{print $2\}'
Write a comment…